[Python-ideas] back-references in comprehensions

yoch melka yoch.melka at gmail.com
Sat Oct 8 19:48:48 CEST 2011


Hi,

I would like to use backreferences in list comprehensions (or other
comprehensions), such as :

[[elt for elt in lst if elt] for lst in matrix if \{1}]
# \{1} is back-reference to filter result of the
# first comprehension ([elt for elt in lst if elt])

It would be possible to do this ?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20111008/084a26d0/attachment.html>


More information about the Python-ideas mailing list