[Python-Dev] Python Library Addition: First-class Procedure Signatures
Steven Bethard
steven.bethard at gmail.com
Thu Nov 15 21:48:44 CET 2007
On Nov 14, 2007 1:18 PM, Brett Cannon <brett at python.org> wrote:
> On Nov 14, 2007 10:30 AM, Isaac Morland <ijmorlan at cs.uwaterloo.ca> wrote:
> > So I wrote a Signature class. Instances of the class represent all the
> > information present between the parentheses of a procedure definition.
> > Properties are provided to get the information out, and an expand_args method
> > can be called to expand arguments into a dictionary. This expand_args method
> > implements (if I've done it right) the argument conversion part of section
> > 5.3.4 of the Python Reference Manual (http://docs.python.org/ref/calls.html).
>
> As Collin already pointed out, it sounds like you want PEP 362 to get
> into the stdlib. I have not made a big push to try to get my existing
> implementation into Python 2.6/3.0, but I plan to at some point.
Every time I read PEP 362, I get lost in the details. When you get
around to working on it again, could you add a bunch of examples?
That would make it much easier to tell why we want all those objects
and attributes.
FWIW, Isaac's version of bind() that returns a regular str->object
dict is all I've ever needed in my own code.
STeVe
--
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
--- Bucky Katt, Get Fuzzy
More information about the Python-Dev
mailing list