Skip to content

Commit 5827720

Browse files
author
guozhen3
committed
opt
1 parent c85bf80 commit 5827720

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -579,14 +579,14 @@ In [1]: class TestIter(object):
579579
...: def __iter__(self): #支持迭代协议(即定义有__iter__()函数)
580580
...: print ("__iter__ is called!!")
581581
...: return iter(self.l)
582-
583-
In [2]: t()
582+
In [2]: t = TestIter()
583+
In [3]: t()
584584
__call__ is called,which would return 1
585-
Out[2]: 1
585+
Out[3]: 1
586586

587-
In [3]: t()
587+
In [4]: t()
588588
__call__ is called,which would return 3
589-
Out[3]: 3
589+
Out[4]: 3
590590

591591
```
592592

0 commit comments

Comments
 (0)