Skip to content

Commit e41321b

Browse files
committed
fix non-unique reference labels
1 parent f719346 commit e41321b

File tree

5 files changed

+14
-26
lines changed

5 files changed

+14
-26
lines changed

lectures/mathfoo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pi = 'foobar'

lectures/mod.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print(__name__)

lectures/names.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ kernelspec:
99
name: python3
1010
---
1111

12-
(oop_intro)=
12+
(oop_names)=
1313
```{raw} jupyter
1414
<div id="qe-notebook-header" align="right" style="text-align:right;">
1515
<a href="https://quantecon.org/" title="quantecon.org">
@@ -18,19 +18,8 @@ kernelspec:
1818
</div>
1919
```
2020

21-
<style>
22-
.auto {
23-
width: 100%;
24-
height: auto;
25-
}
26-
</style>
27-
2821
# OOP I: Names and Namespaces
2922

30-
```{contents} Contents
31-
:depth: 2
32-
```
33-
3423
## Overview
3524

3625
This lecture is all about variable names, how they can be used and how they are
@@ -42,7 +31,7 @@ handling names is elegant and interesting.
4231
In addition, you will save yourself many hours of debugging if you have a good
4332
understanding of how names work in Python.
4433

45-
(name_res)=
34+
(var_names)=
4635
## Variable Names in Python
4736

4837
```{index} single: Python; Variable Names

lectures/oop_intro.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,8 @@ kernelspec:
1818
</div>
1919
```
2020

21-
<style>
22-
.auto {
23-
width: 100%;
24-
height: auto;
25-
}
26-
</style>
27-
2821
# OOP I: Names and Objects
2922

30-
```{contents} Contents
31-
:depth: 2
32-
```
33-
3423
## Overview
3524

3625
The traditional programming paradigm (think Fortran, C, MATLAB, etc.) is called [procedural](https://en.wikipedia.org/wiki/Procedural_programming).
@@ -714,8 +703,8 @@ Next `g` is called via `y = g(10)`, leading to the following sequence of actions
714703
```
715704

716705

717-
(mutable_vs_immutable)=
718-
### {index}`Mutable <single: Mutable>` Versus {index}`Immutable <single: Immutable>` Parameters
706+
(mutable_vs_immutable2)=
707+
### {index}`Mutable <single: Mutable>` versus {index}`Immutable <single: Immutable>` parameters
719708

720709
This is a good time to say a little more about mutable vs immutable objects.
721710

lectures/test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def g(x):
2+
a = 1
3+
x = x + a
4+
return x
5+
6+
a = 0
7+
y = g(10)
8+
print("a = ", a, "y = ", y)

0 commit comments

Comments
 (0)