We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f37b83 commit 067b665Copy full SHA for 067b665
README.md
@@ -582,7 +582,7 @@ from functools import partial
582
583
```python
584
def get_counter():
585
- a = 1
+ a = 0
586
def out():
587
nonlocal a
588
a += 1
@@ -722,11 +722,12 @@ class MySequence:
722
723
### Callable
724
725
-class MyCallable:
726
- def __init__(self, a):
727
- self.a = a
+class Counter:
+ def __init__(self):
+ self.a = 0
728
def __call__(self):
729
- return a
+ self.a += 1
730
+ return self.a
731
```
732
733
### Copy
0 commit comments