diff Python/compile.c @ 82135:6917402c6191

evaluate lambda keyword-only defaults after positional defaults (#16967 again)
author Benjamin Peterson <benjamin@python.org>
date Sun, 10 Feb 2013 09:48:22 -0500
parents d296cf1600a8
children 7c5c678e4164
line wrap: on
line diff
--- a/Python/compile.c	Sun Feb 10 09:32:22 2013 -0500
+++ b/Python/compile.c	Sun Feb 10 09:48:22 2013 -0500
@@ -1794,14 +1794,14 @@
             return 0;
     }
 
+    if (args->defaults)
+        VISIT_SEQ(c, expr, args->defaults);
     if (args->kwonlyargs) {
         int res = compiler_visit_kwonlydefaults(c, args->kwonlyargs,
                                                 args->kw_defaults);
         if (res < 0) return 0;
         kw_default_count = res;
     }
-    if (args->defaults)
-        VISIT_SEQ(c, expr, args->defaults);
     if (!compiler_enter_scope(c, name, COMPILER_SCOPE_FUNCTION,
                               (void *)e, e->lineno))
         return 0;