Commit Graph

6 Commits

Author SHA1 Message Date
Phillip J. Eby 00148226df Fix a too-aggressive assert (see SF#1257960). Previously, gen_iternext
was never called during interpreter shutdown GC, so the f_back!=NULL
assertion was correct.  Now that generators get close()d during GC,
the assertion was being triggered because the generator close() was being
called as the top-level frame.  However, nothing actually is broken by
this; it's just that the condition was unexpected in previous Python
versions.
2005-08-13 03:29:00 +00:00
Phillip J. Eby 0d6615fd29 PEP 342 implementation. Per Guido's comments, the generator throw()
method still needs to support string exceptions, and allow None for the
third argument.  Documentation updates are needed, too.
2005-08-02 00:46:46 +00:00
Raymond Hettinger 75ccea3777 SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes
(Contributed by Dima Dorfman)
2004-09-01 07:02:44 +00:00
Martin v. Löwis 8d97e33bb7 Patch #966493: Cleanup generator/eval_frame exposure. 2004-06-27 15:43:12 +00:00
Raymond Hettinger 6c7a00fbaa * Factor out PyObject_SelfIter().
* Change a XDECREF to DECREF (adding an assertion just to be sure).
2004-06-12 05:17:55 +00:00
Martin v. Löwis e440e47e91 Patch #957398: Add public API for Generator Object/Type. 2004-06-01 15:22:42 +00:00