Staging
v0.8.1
v0.8.1
https://github.com/python/cpython
Revision 73a7e9b10b2ec9636e3c6396cf7b3695f8ed1856 authored by Serhiy Storchaka on 01 December 2017, 04:54:17 UTC, committed by Nick Coghlan on 01 December 2017, 04:54:17 UTC
The current behaviour of yield expressions inside comprehensions and generator expressions is essentially an accident of implementation - it arises implicitly from the way the compiler handles yield expressions inside nested functions and generators. Since the current behaviour wasn't deliberately designed, and is inherently confusing, we're deprecating it, with no current plans to reintroduce it. Instead, our advice will be to use a named nested generator definition for cases where this behaviour is desired.
1 parent 6a89481
Tip revision: 73a7e9b10b2ec9636e3c6396cf7b3695f8ed1856 authored by Serhiy Storchaka on 01 December 2017, 04:54:17 UTC
bpo-10544: Deprecate "yield" in comprehensions and generator expressions. (GH-4579)
bpo-10544: Deprecate "yield" in comprehensions and generator expressions. (GH-4579)
Tip revision: 73a7e9b
File | Mode | Size |
---|---|---|
clinic | ||
stringlib | ||
README | -rw-r--r-- | 41 bytes |
abstract.c | -rw-r--r-- | 66.8 KB |
accu.c | -rw-r--r-- | 2.4 KB |
boolobject.c | -rw-r--r-- | 6.5 KB |
bytearrayobject.c | -rw-r--r-- | 69.2 KB |
bytes_methods.c | -rw-r--r-- | 21.1 KB |
bytesobject.c | -rw-r--r-- | 99.2 KB |
call.c | -rw-r--r-- | 36.8 KB |
capsule.c | -rw-r--r-- | 7.2 KB |
cellobject.c | -rw-r--r-- | 4.4 KB |
classobject.c | -rw-r--r-- | 18.3 KB |
codeobject.c | -rw-r--r-- | 26.7 KB |
complexobject.c | -rw-r--r-- | 32.3 KB |
descrobject.c | -rw-r--r-- | 54.9 KB |
dict-common.h | -rw-r--r-- | 2.3 KB |
dictnotes.txt | -rw-r--r-- | 6.0 KB |
dictobject.c | -rw-r--r-- | 126.6 KB |
enumobject.c | -rw-r--r-- | 13.3 KB |
exceptions.c | -rw-r--r-- | 85.3 KB |
fileobject.c | -rw-r--r-- | 14.8 KB |
floatobject.c | -rw-r--r-- | 71.1 KB |
frameobject.c | -rw-r--r-- | 32.3 KB |
funcobject.c | -rw-r--r-- | 29.2 KB |
genobject.c | -rw-r--r-- | 65.0 KB |
iterobject.c | -rw-r--r-- | 9.0 KB |
listobject.c | -rw-r--r-- | 86.2 KB |
listsort.txt | -rw-r--r-- | 34.9 KB |
lnotab_notes.txt | -rw-r--r-- | 5.7 KB |
longobject.c | -rw-r--r-- | 166.1 KB |
memoryobject.c | -rw-r--r-- | 88.7 KB |
methodobject.c | -rw-r--r-- | 9.2 KB |
moduleobject.c | -rw-r--r-- | 22.3 KB |
namespaceobject.c | -rw-r--r-- | 7.2 KB |
object.c | -rw-r--r-- | 58.7 KB |
obmalloc.c | -rw-r--r-- | 83.0 KB |
odictobject.c | -rw-r--r-- | 76.3 KB |
rangeobject.c | -rw-r--r-- | 34.3 KB |
setobject.c | -rw-r--r-- | 73.3 KB |
sliceobject.c | -rw-r--r-- | 19.2 KB |
structseq.c | -rw-r--r-- | 13.1 KB |
tupleobject.c | -rw-r--r-- | 30.1 KB |
typeobject.c | -rw-r--r-- | 237.0 KB |
typeslots.inc | -rw-r--r-- | 3.9 KB |
typeslots.py | -rwxr-xr-x | 1.2 KB |
unicodectype.c | -rw-r--r-- | 7.5 KB |
unicodeobject.c | -rw-r--r-- | 450.2 KB |
unicodetype_db.h | -rw-r--r-- | 233.8 KB |
weakrefobject.c | -rw-r--r-- | 29.5 KB |
Computing file changes ...