Message208455
Your fixes for #1 and #2 were fine, I've incorporated them into the patch. I'll update the diff after I've added the tests Nick suggested.
The assertion failure in #3 will also be gone, replaced with a failure:
You can't have two parameters named module!
The problem is that we silently inserted a self converter for the first argument, and because this is a module-level function, that "self" parameter is naturally named "module".
I have a fix in mind for this: basically to teach Argument Clinic that the parser function and impl function have different namespaces, and to map names in the first to the second. So, you could have a parameter named "args", and Clinic would notice, and rename the variable in the parser function "args_value" or something, and then pass it in in the right spot. Once I've done that, it'd be easy to make it also rename the secret self converter name to "_module" or something. Anyway, long story short, let's not try to fix #3 in this patch. |
|
Date |
User |
Action |
Args |
2014-01-19 06:40:29 | larry | set | recipients:
+ larry, gvanrossum, tim.peters, barry, brett.cannon, ncoghlan, skrah, meador.inge, zach.ware, yselivanov |
2014-01-19 06:40:29 | larry | set | messageid: <1390113629.63.0.973627376607.issue20189@psf.upfronthosting.co.za> |
2014-01-19 06:40:29 | larry | link | issue20189 messages |
2014-01-19 06:40:29 | larry | create | |
|