List comprehension - NameError: name '_' is not defined ?
mario.ruggier at gmail.com
Thu Jan 15 13:58:01 CET 2009
On Jan 15, 1:48 pm, bearophileH... at lycos.com wrote:
> mario ruggier, that's a hack that you can forget. Your code can't be
> read. Don't use list comps for that purpose. Write code that can be
Ya, agree with you whole-heartily, but then so are most
optimizations ;-) It is just an idea I am exploring, and that code
would be never be humanly written (that's why it seems more convoluted
than necessary). I hope the simplified boiled down sample gets the
intention out better... i'd still would like to understand why the '_
' variable is disappearing after first inner loop!
More information about the Python-list