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.
Created on 2014年01月25日 08:53 by serhiy.storchaka, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (7) | |||
|---|---|---|---|
| msg209166 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年01月25日 08:53 | |
Argument Clinic generates wrong signature for module level functions. For example for the following declaration /*[clinic input] binascii.a2b_uu ascii: ascii_buffer / Decode a line of uuencoded data. [clinic start generated code]*/ Argument Clinic generates PyDoc_STRVAR(binascii_a2b_uu__doc__, "a2b_uu(module, ascii)\n" "Decode a line of uuencoded data."); |
|||
| msg209167 - (view) | Author: Zachary Ware (zach.ware) * (Python committer) | Date: 2014年01月25日 08:55 | |
That's by design (of #20189); inspect.Signature.from_builtin strips out the 'module' param. |
|||
| msg209169 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年01月25日 09:00 | |
What if function already has the "module" parameter? E.g. _warnings.warn_explicit. |
|||
| msg209171 - (view) | Author: Zachary Ware (zach.ware) * (Python committer) | Date: 2014年01月25日 09:06 | |
Ahh, that is a good point, though the real problem with that is in compilation rather than the Python signature. I believe there's a fix in the works, somewhere in Larry's to-do list. _winapi also has a function that takes a 'module' parameter, though being undocumented (and referring to a handle, not a Python module), I was able to just name that one 'module_handle'. |
|||
| msg209178 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2014年01月25日 09:40 | |
If you use a self converter you can name your first parameter anything you like. |
|||
| msg209182 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2014年01月25日 10:06 | |
So, are you still claiming there's a bug here? Or can we close this? |
|||
| msg209188 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年01月25日 10:51 | |
Well, if originally reported behavior is by design, and there is other open issue for the "module" parameter, we can close this. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:57 | admin | set | github: 64587 |
| 2014年01月25日 10:53:17 | larry | set | status: open -> closed resolution: not a bug stage: resolved |
| 2014年01月25日 10:51:59 | serhiy.storchaka | set | messages: + msg209188 |
| 2014年01月25日 10:06:31 | larry | set | messages: + msg209182 |
| 2014年01月25日 10:00:29 | serhiy.storchaka | unlink | issue20151 dependencies |
| 2014年01月25日 09:40:09 | larry | set | messages: + msg209178 |
| 2014年01月25日 09:06:56 | zach.ware | set | resolution: not a bug -> (no value) messages: + msg209171 title: Argument Clinic generates wrong signature for module level functions -> Argument Clinic doesn't handle module level functions with module parameter well |
| 2014年01月25日 09:00:17 | serhiy.storchaka | set | status: pending -> open messages: + msg209169 |
| 2014年01月25日 08:55:27 | zach.ware | set | status: open -> pending nosy: + zach.ware messages: + msg209167 resolution: not a bug |
| 2014年01月25日 08:53:48 | serhiy.storchaka | link | issue20151 dependencies |
| 2014年01月25日 08:53:27 | serhiy.storchaka | create | |