mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
Teach the types module about generators. Thanks to James Althoff on the
Iterators list for bringing it up!
This commit is contained in:
parent
ae1f65ff82
commit
3e7b1a04a0
3 changed files with 31 additions and 0 deletions
|
|
@ -32,6 +32,11 @@ try:
|
|||
except:
|
||||
pass
|
||||
|
||||
def g():
|
||||
yield 1
|
||||
GeneratorType = type(g())
|
||||
del g
|
||||
|
||||
class _C:
|
||||
def _m(self): pass
|
||||
ClassType = type(_C)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue