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 belopolsky
Recipients
Date 2007-03-19.19:57:23
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
I have just realized that the requested functionality is known in C as the comma operator.  I often find myself writing "return Py_INCREF(o),o;" in my C code, but I cannot really defend that idiom against "Py_INCREF(o); return o;" alternative.  My personal reason is entirely C-specific, if  followed an if(), the first form does not require curly braces.

In any case, comma operator can be emulated in python as

exp1,expr2,expr3   ->  (exp1,expr2,expr3)[-1]


Since multi-argument "identity" is likely to be rejected, my proposal to alter the order of arguments is moot.  My other suggestion that with identity, map(None, ..) should be deprecated in favor of map(identity, ..) is probably an arument against the identity proposal now.  
History
Date User Action Args
2007-08-23 16:12:36adminlinkissue1673203 messages
2007-08-23 16:12:36admincreate