On Nov 15, 2007 12:48 PM, Steven Bethard <[EMAIL PROTECTED]> wrote: > On Nov 14, 2007 1:18 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: > > On Nov 14, 2007 10:30 AM, Isaac Morland <[EMAIL PROTECTED]> 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. >
You might not need them in general. It just re-packages all the information that is found between a function object and a code object into a single location. > FWIW, Isaac's version of bind() that returns a regular str->object > dict is all I've ever needed in my own code. That's what the implementation does at the moment (if I remember correctly). I am about to bundle up the code and submit to PyPI to get feedback from folks and to just get it out there instead of languishing in the sandbox while I try to decide exactly what to do about the open issues. I will see if i can toss in some examples into the PEP. -Brett _______________________________________________ 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