We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c85bf80 commit 5827720Copy full SHA for 5827720
1 file changed
README.md
@@ -579,14 +579,14 @@ In [1]: class TestIter(object):
579
...: def __iter__(self): #支持迭代协议(即定义有__iter__()函数)
580
...: print ("__iter__ is called!!")
581
...: return iter(self.l)
582
-
583
-In [2]: t()
+In [2]: t = TestIter()
+In [3]: t()
584
__call__ is called,which would return 1
585
-Out[2]: 1
+Out[3]: 1
586
587
-In [3]: t()
+In [4]: t()
588
__call__ is called,which would return 3
589
-Out[3]: 3
+Out[4]: 3
590
591
```
592
0 commit comments