diff options
author | Georg Brandl <georg@python.org> | 2007-06-07 13:23:24 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-06-07 13:23:24 (GMT) |
commit | e06cf4534f738f0ad4669f504fbde58bf8b3fb86 (patch) | |
tree | 2e037d4be486a07e6107f2bfd0eadb07a92c5b96 /Lib | |
parent | ab8e279ba675eb399d278f3d14b6452c4c32db7d (diff) | |
download | cpython-e06cf4534f738f0ad4669f504fbde58bf8b3fb86.zip cpython-e06cf4534f738f0ad4669f504fbde58bf8b3fb86.tar.gz cpython-e06cf4534f738f0ad4669f504fbde58bf8b3fb86.tar.bz2 |
Disallow function calls like foo(None=1).
Backport from py3k rev. 55708 by Guido.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_compile.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index d1b6d8c..367a694 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -36,6 +36,9 @@ class TestSpecifics(unittest.TestCase): def test_syntax_error(self): self.assertRaises(SyntaxError, compile, "1+*3", "filename", "exec") + def test_none_keyword_arg(self): + self.assertRaises(SyntaxError, compile, "f(None=1)", "<string>", "exec") + def test_duplicate_global_local(self): try: exec 'def f(a): global a; a = 1' |