This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author twouters
Recipients belopolsky, georg.brandl, gvanrossum, twouters
Date 2008-04-05.23:59:38
SpamBayes Score 0.22872598
Marked as misclassified No
Message-id <1207440001.95.0.079363008299.issue2292@psf.upfronthosting.co.za>
In-reply-to
Content
Updated patch: reworked some internals, and added generalization of
functioncalls after talking with Guido. *args is now considered just
another positional argument, and can occur anywhere in the positional
argument section. It can also occur more than once. Keyword arguments
now have to appear after *args, and **kwargs can now occur multiple
times at any position in the keyword argument list. test_extcall has
some examples.

(The opcodes are largely unaffected; just the order of '*args' and
keyword arguments is changed. Behind the scenes, anything after the
first '*args' argument is collapsed into a single *args, and everything
after the first '**kwargs' is likewise collapsed. The common case
(meaning any currently valid syntax, barring the 2to3 fix to swap *args
and keyword arguments) does not change in meaning or codepath, just the
complex cases are handled differently.)

This is still Work In Progress. To do: implement the dict unpacking
syntax (the mechanics are already there for keyword arguments to
functioncalls), make sure the precendence of * is correct, get more
complete test coverage, iron out the cosmetic bugs in the 2to3 fixer.

Bzr branch for this patch is
http://code.python.org/python/users/twouters/starunpack . There is also
a branch with just the functioncall changes (although the starunpack
changes are a small sprinkling on top of that branch, as it uses the
same new mechanics): http://code.python.org/python/users/twouters/funcargs .
History
Date User Action Args
2008-04-06 00:00:12twouterssetspambayes_score: 0.228726 -> 0.22872598
recipients: + twouters, gvanrossum, georg.brandl, belopolsky
2008-04-06 00:00:02twouterssetspambayes_score: 0.228726 -> 0.228726
messageid: <1207440001.95.0.079363008299.issue2292@psf.upfronthosting.co.za>
2008-04-05 23:59:59twouterslinkissue2292 messages
2008-04-05 23:59:57twouterscreate