[Python-Dev] decorator module in stdlib?

Nick Coghlan ncoghlan at gmail.com
Thu Apr 9 15:16:26 CEST 2009


Michele Simionato wrote:
> On Thu, Apr 9, 2009 at 2:11 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> One of my hopes for PEP 362 was that I would be able to just add
>> __signature__ to the list of copied attributes, but that PEP is
>> currently short a champion to work through the process of resolving the
>> open issues and creating an up to date patch (Brett ended up with too
>> many things on his plate so he wasn't able to do it, and nobody else has
>> offered to take it over).
> 
> I am totally ignorant about the internals of Python and I cannot certainly
> take that role. But I would like to hear from Guido if he wants to support
> a __signature__ object or if he does not care. In the first case
> I think somebody will take the job, in the second case it is better to
> reject the PEP and be done with it.

I don't recall Guido being opposed when PEP 362 was first being
discussed (keeping in mind that was more than 2 years ago, so he's quite
entitled to have changed his mind in the meantime!).

That said, it's a sensible, largely straightforward idea, and by
creating the object lazily it doesn't even have to incur a runtime cost
in programs that don't do much introspection.

I think the main problem leading to the current lack of movement on the
PEP is that the existing inspect module is good enough for most
practical purposes (which are fairly rare in the first place), so this
isn't perceived as a huge gain even for the folks that are interested in
introspection.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list