Skip to content

Commit c8f2cde

Browse files
committed
Nonlocal
1 parent 967c8d4 commit c8f2cde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ from functools import partial
582582

583583
```python
584584
def get_counter():
585-
a = 0
585+
a = 1
586586
def out():
587587
nonlocal a
588588
a += 1
@@ -593,7 +593,7 @@ def get_counter():
593593
```python
594594
>>> counter = get_counter()
595595
>>> counter(), counter(), counter()
596-
(0, 1, 2)
596+
(1, 2, 3)
597597
```
598598

599599

0 commit comments

Comments
 (0)