Disallow function calls like foo(None=1).
Backport from py3k rev. 55708 by Guido.
(backport from rev. 55802)
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index a3f15bf..1a98d2f 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -37,6 +37,9 @@
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'