Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e41321b

Browse filesBrowse files
committed
fix non-unique reference labels
1 parent f719346 commit e41321b
Copy full SHA for e41321b

File tree

Expand file treeCollapse file tree

5 files changed

+14
-26
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+14
-26
lines changed
Open diff view settings
Collapse file

‎lectures/mathfoo.py‎

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

‎lectures/mod.py‎

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

‎lectures/names.md‎

Copy file name to clipboardExpand all lines: lectures/names.md
+2-13Lines changed: 2 additions & 13 deletions
  • Display the source diff
  • Display the rich diff
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
Collapse file

‎lectures/oop_intro.md‎

Copy file name to clipboardExpand all lines: lectures/oop_intro.md
+2-13Lines changed: 2 additions & 13 deletions
  • Display the source diff
  • Display the rich diff
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

Collapse file

‎lectures/test.py‎

Copy file name to clipboard
+8Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.