[Python-Dev] PEP 362 Third Revision (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Thu Jun 14 12:00:27 CEST 2012
- Previous message: [Python-Dev] PEP 362 Third Revision
- Next message: [Python-Dev] PEP 362 Third Revision
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jun 14, 2012 2:31 PM, "Alexandre Zani" <alexandre.zani at gmail.com> wrote:
Why do we look at wrapped only if the object is a FunctionType? Why not support wrapped on all callables?
Fair question - duck typing here makes more sense to me, too.
Why special-case functools.partial? Couldn't functools.partial just set signature itself? Is that because of inspect's dependency on functools?
Got it in one. Really, it's the same reason we don't burden the builtin callable machinery with it - to ensure the dependencies only flow in one direction.
Just a thought: Do we want to include the docstring? A function's docstring is often intimately tied to its signature. (Or at least, a lot of us try to write docstrings that effectively describe the function's signature)
No, combining the signature with other details like the name and docstring is the task of higher level interfaces like pydoc.
Cheers, Nick.
-- Sent from my phone, thus the relative brevity :) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120614/47854d11/attachment.html>
- Previous message: [Python-Dev] PEP 362 Third Revision
- Next message: [Python-Dev] PEP 362 Third Revision
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]