changeset 2542:07ac71a1d9d2

fix bug with positional args and the special ones
author Johannes Berg <johannes AT sipsolutions DOT net>
date Mon, 23 Jul 2007 19:36:25 +0200
parents 5477d7f5ad64
children 116ab80df98b
files MoinMoin/wikiutil.py
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/wikiutil.py	Mon Jul 23 19:36:04 2007 +0200
+++ b/MoinMoin/wikiutil.py	Mon Jul 23 19:36:25 2007 +0200
@@ -1584,12 +1584,15 @@
     # convert all arguments to keyword arguments,
     # fill all arguments that weren't given with None
     for idx in range(argc):
+        argname = argnames[idx]
+        if argname in ['_non_ascii_kwargs', '_trailing_args']:
+            continue
         if idx < len(positional):
-            kwargs[argnames[idx]] = positional[idx]
-        if not (argnames[idx] in kwargs):
-            kwargs[argnames[idx]] = None
+            kwargs[argname] = positional[idx]
+        if not argname in kwargs:
+            kwargs[argname] = None
         if idx >= defstart:
-            defaults[argnames[idx]] = defaultlist[idx - defstart]
+            defaults[argname] = defaultlist[idx - defstart]
 
     # type-convert all keyword arguments to the type
     # that the default value indicates