diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-06-25 19:46:25 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-06-25 19:46:25 +0000 |
commit | 70d5aca73860e3965e6617b83f1bc7a5d86dd670 (patch) | |
tree | 667cfd0ef14c43aee49148aab96b1ed9bf364a9d /Lib/types.py | |
parent | 46759c77731dc422fd5cadf285f6c4e28e175fa1 (diff) | |
download | cpython-70d5aca73860e3965e6617b83f1bc7a5d86dd670.tar.gz |
Teach the types module about generators. Thanks to James Althoff on the
Iterators list for bringing it up!
Diffstat (limited to 'Lib/types.py')
-rw-r--r-- | Lib/types.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/types.py b/Lib/types.py index a71a4db4e9..85962bada4 100644 --- a/Lib/types.py +++ b/Lib/types.py @@ -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) |