[Python-Dev] signature object issues (to discuss while I am out of contact) (original) (raw)

Aahz aahz at pythoncraft.com
Mon May 1 21:25:27 CEST 2006


On Mon, May 01, 2006, Brett Cannon wrote:

But there are two things that I can't quite decide upon. One is whether a signature object should be automatically created for every function. As of right now the PEP I am drafting has it on a per-need basis and have it assigned to signature through a built-in function or putting it 'inspect'. Now automatically creating the object would possibly make it more useful, but it could also be considered overkill. Also not doing it automatically allows signature objects to possibly make more sense for classes (to represent init) and instances (to represent call). But having that same support automatically feels off for some reason to me.

My take is that we should do it automatically and provide a helper function that does additional work. The class case is already complicated by new(); we probably don't want to automatically sort out init() vs new(), but I think we do want regular functions and methods to automatically have a signature attribute. Aside from the issue with classes, are there any other drawbacks to automatically creating signature?

Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/

"Argue for your limitations, and sure enough they're yours." --Richard Bach



More information about the Python-Dev mailing list