[Python-Dev] Updated PEP 362 (Function Signature Object)

Nick Coghlan ncoghlan at gmail.com
Wed Jun 6 23:29:13 CEST 2012


On Jun 7, 2012 12:20 AM, "Yury Selivanov" <yselivanov.ml at gmail.com> wrote:
>> I agree, that we shouldn't make 'functools' be dependent on 'inspect'
module.
> Moreover, this is not even currently possible, as it creates an
import-loop
> that is hard to untie. But how about the following:
>> 1. Separate 'Signature' object from 'inspect' module, and move it to a
> private '_signature.py' (that will depend only on
'collections.OrderedDict',
> 'itertools.chain' and 'types')
>> 2. Publish it in the 'inspect' module
>> 3. Make 'signature' method to work with any callable
>> 4. Make 'Signature' class to accept only functions
>> 5. Import '_signature' in the 'functools', and use 'Signature' class
> directly, as it will accept just plain functions.
>> Would this work?

Sounds like a good plan to me.
Cheers,
Nick.
--
Sent from my phone, thus the relative brevity :)
>> -
> Yury
>-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120607/da569081/attachment.html>


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /