This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author larry
Recipients barry, brett.cannon, gvanrossum, larry, meador.inge, ncoghlan, skrah, tim.peters, yselivanov, zach.ware
Date 2014-01-19.06:40:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390113629.63.0.973627376607.issue20189@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-01-19 06:40:29larrysetrecipients: + larry, gvanrossum, tim.peters, barry, brett.cannon, ncoghlan, skrah, meador.inge, zach.ware, yselivanov
2014-01-19 06:40:29larrysetmessageid: <1390113629.63.0.973627376607.issue20189@psf.upfronthosting.co.za>
2014-01-19 06:40:29larrylinkissue20189 messages
2014-01-19 06:40:29larrycreate