]> granicus.if.org Git - python/commit
Fix SF bug #1458903 with AST compiler.
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 27 Mar 2006 08:58:23 +0000 (08:58 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 27 Mar 2006 08:58:23 +0000 (08:58 +0000)
commit33b730e33cb0a63f4030d1587a6196dcde36e965
tree1f20b2cdd510692f3904ddb85b0bf446994b4d66
parent6c403597954487e8129221351f72da3735c52c09
Fix SF bug #1458903 with AST compiler.

def foo((x)): was getting recognized as requiring tuple unpacking
which is not correct.

Add tests for this case and the proper way to unpack a tuple of one:
def foo((x,)):

test_inpsect was incorrect before.  I'm not sure why it was passing,
but that has been corrected with a test for both functions above.
This means the test (and therefore inspect.getargspec()) are broken in 2.4.
Lib/test/test_grammar.py
Lib/test/test_inspect.py
Python/ast.c