evaluate positional defaults before keyword-only defaults (closes #16967)

This commit is contained in:
Benjamin Peterson 2013-02-10 09:29:59 -05:00
parent 34a2a87d17
commit 1ef876cd28
7 changed files with 161 additions and 147 deletions

View file

@ -396,13 +396,15 @@ Known values:
3210 (added size modulo 2**32 to the pyc header)
Python 3.3a1 3220 (changed PEP 380 implementation)
Python 3.3a4 3230 (revert changes to implicit __class__ closure)
Python 3.4a1 3240 (evaluate positional default arguments before
keyword-only defaults)
MAGIC must change whenever the bytecode emitted by the compiler may no
longer be understood by older implementations of the eval loop (usually
due to the addition of new opcodes).
"""
_RAW_MAGIC_NUMBER = 3230 | ord('\r') << 16 | ord('\n') << 24
_RAW_MAGIC_NUMBER = 3240 | ord('\r') << 16 | ord('\n') << 24
_MAGIC_BYTES = bytes(_RAW_MAGIC_NUMBER >> n & 0xff for n in range(0, 25, 8))
_PYCACHE = '__pycache__'