Message55025
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. |
|
Date |
User |
Action |
Args |
2007-08-23 16:12:36 | admin | link | issue1673203 messages |
2007-08-23 16:12:36 | admin | create | |
|