On Jun 14, 2012 2:31 PM, "Alexandre Zani" <alexandre.z...@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 :)
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com