Scott Dial wrote: > The regression is purely in the way an argument list is reduced to a > dictionary. To further elaborate: Python 2.4: >>> import dis >>> dis.dis(compile('f(a=3, b=1, a=4)', '', 'eval')) Traceback (most recent call last): File "<stdin>", line 1, in ? SyntaxError: duplicate keyword argument Python 2.5: >>> import dis >>> dis.dis(compile('f(a=3, b=1, a=4)', '', 'eval')) 1 0 LOAD_NAME 0 (f) 3 LOAD_CONST 0 ('a') 6 LOAD_CONST 1 (3) 9 LOAD_CONST 2 ('b') 12 LOAD_CONST 3 (1) 15 LOAD_CONST 0 ('a') 18 LOAD_CONST 4 (4) 21 CALL_FUNCTION 768 24 RETURN_VALUE The old compiler checked for this, but the AST-based compiler just blindly compiles the entire keyword argument sequence. -Scott -- Scott Dial scott at scottdial.com scodial at cs.indiana.edu
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4