[Python-ideas] Anaphoric if

Bruce Leban bruce at leapyear.org
Sat Apr 24 01:53:18 CEST 2010


def anaphor(x):
  return (x,) if x else ()

for foo in anaphor(bar):
   ...

--- Bruce
(via android)

On Apr 23, 2010 4:18 PM, "Chris Rebert" <pyideas at rebertia.com> wrote:

On Fri, Apr 23, 2010 at 1:47 PM, Andrey Fedorov <anfedorov at gmail.com> wrote:
> I imagine this has be...
Master Yoda had me google "python-ideas if assignment", which was fruitful:

[Python-ideas] Inline assignment expression:
http://mail.python.org/pipermail/python-ideas/2009-March/003423.html

Post in same thread summarizing rejection reasons:
http://mail.python.org/pipermail/python-ideas/2009-March/003440.html

Cheers,
Chris
--
The moratorium makes this pointless anyways.
http://blog.rebertia.com

_______________________________________________
Python-ideas mailing list
Python-ideas at python.org
ht...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20100423/12edabb2/attachment.html>


More information about the Python-ideas mailing list