cpython/Python
Tim Peters ad1a18b78e Change the semantics of "return" in generators, as discussed on the
Iterators list and Python-Dev; e.g., these all pass now:

def g1():
    try:
        return
    except:
        yield 1
assert list(g1()) == []

def g2():
    try:
        return
    finally:
        yield 1
assert list(g2()) == [1]

def g3():
    for i in range(3):
        yield None
    yield None
assert list(g3()) == [None] * 4

compile.c:  compile_funcdef and com_return_stmt:  Just van Rossum's patch
to compile the same code for "return" regardless of function type (this
goes back to the previous scheme of returning Py_None).

ceval.c:  gen_iternext:  take a return (but not a yield) of Py_None as
meaning the generator is exhausted.
2001-06-23 06:19:16 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
atof.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
bltinmodule.c Cruft cleanup: Removed the unused last_is_sticky argument from the internal 2001-05-28 22:30:08 +00:00
ceval.c Change the semantics of "return" in generators, as discussed on the 2001-06-23 06:19:16 +00:00
codecs.c Rationalize use of limits.h, moving the inclusion to Python.h. 2000-09-26 05:46:01 +00:00
compile.c Change the semantics of "return" in generators, as discussed on the 2001-06-23 06:19:16 +00:00
dup2.c Mass ANSIfication of function definitions. Doesn't cover all 'extern' 2000-07-22 18:47:25 +00:00
dynload_aix.c Fix the char* vs. const char* mismatch for the argument of aix_loaderror() 2000-09-04 00:54:56 +00:00
dynload_beos.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_dl.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_hpux.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_mac.c Use #if TARGET_API_MAC_CARBON to determine carbon/classic macos, not #ifdef. 2001-01-19 23:34:06 +00:00
dynload_next.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_os2.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_shlib.c Oops, one more part of the cygwin patch (SF patch #102409 by jlt63: 2001-01-10 21:17:27 +00:00
dynload_stub.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_win.c Always pass a full path name to LoadLibraryEx(). Fixes some Windows 9x problems. As discussed on python-dev 2001-05-09 00:50:59 +00:00
errors.c PyErr_Occurred(): Use PyThreadState_GET(), which saves a tiny function call 2001-05-30 06:09:50 +00:00
exceptions.c Iterators phase 1. This comprises: 2001-04-20 19:13:02 +00:00
fmod.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
frozen.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
frozenmain.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
future.c When iterating over the names imported in a future statement, ignore the 2001-03-10 02:15:37 +00:00
getargs.c Change cascaded if stmts to switch stmt in vgetargs1(). 2001-05-29 17:46:19 +00:00
getcompiler.c The GCC version is loooooooooong; put it on a new line. 2000-09-05 04:40:39 +00:00
getcopyright.c Because this code was derived from Python 1.6.1 (amongst others), the 2001-04-12 20:53:31 +00:00
getcwd.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
getmtime.c Move distributed and duplicated config for stat() and fstat() into pyport.h. 2001-01-18 03:03:16 +00:00
getopt.c Move our own getopt() implementation to _PyOS_GetOpt(), and use it 2000-11-03 08:18:37 +00:00
getplatform.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
getversion.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
graminit.c Merging the gen-branch into the main line, at Guido's direction. Yay! 2001-06-18 22:08:13 +00:00
hypot.c merge Include/my*.h into Include/pyport.h 2000-07-31 15:28:04 +00:00
import.c SF bug #417093: Case sensitive import: dir and .py file w/ same name 2001-04-29 22:21:25 +00:00
importdl.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
importdl.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
marshal.c Merging the gen-branch into the main line, at Guido's direction. Yay! 2001-06-18 22:08:13 +00:00
memmove.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
modsupport.c Py_BuildValue(): Add "D" conversion to create a Python complex value from 2001-03-12 21:03:26 +00:00
mystrtoul.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
pyfpe.c Mass ANSIfication of function definitions. Doesn't cover all 'extern' 2000-07-22 18:47:25 +00:00
pystate.c Add a new API, PyThreadState_DeleteCurrent() that combines 2001-01-23 01:46:06 +00:00
pythonmain.c Allow mac user to set "command line flags" by option-starting python. 1995-07-29 13:53:59 +00:00
pythonrun.c Temporarily disable the message to stderr. Jeremy will know what to do 2001-06-13 17:18:06 +00:00
sigcheck.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
strdup.c Mass ANSIfication of function definitions. Doesn't cover all 'extern' 2000-07-22 18:47:25 +00:00
strerror.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
strtod.c Mass ANSIfication of function definitions. Doesn't cover all 'extern' 2000-07-22 18:47:25 +00:00
structmember.c SF bug http://sourceforge.net/bugs/?func=detailbug&bug_id=130242&group_id=5470 2001-01-27 06:20:08 +00:00
symtable.c Merging the gen-branch into the main line, at Guido's direction. Yay! 2001-06-18 22:08:13 +00:00
sysmodule.c Instead of initializing & interning the strings passed to the profile 2001-06-16 21:02:31 +00:00
thread.c Donn Cave <donn@u.washington.edu>: 2000-10-06 15:48:38 +00:00
thread_beos.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_cthread.h Fix syntax error. Submitted by Bill Bumgarner. Apparently this is 2000-11-13 19:45:45 +00:00
thread_foobar.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_lwp.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_nt.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_os2.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_pth.h Andy Dustman <adustman@users.sourceforge.net>: 2000-10-12 20:58:32 +00:00
thread_pthread.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_sgi.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_solaris.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_wince.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
traceback.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00