A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/103624.html below:

list comprehensions whats happening here

list comprehensions whats happening hereGreg Ewing see at my.signature
Fri Apr 20 01:13:52 EDT 2001
Carlos Ribeiro wrote:
> 
> At 22:14 13/04/01 -0400, Terry Reedy wrote:
> >[[0,j] for j in ('a','b','c')] is much cleaner and faster.  Methinks
> >turning a constant into a pseudovariable is the wrong way to go.
> 
> I apologize for wasting bandwidth
> when a *much* better idiom is already available.

It is, however, an interesting way of introducing a
"local variable" binding in the middle of a list
comprehension.

Not that I'd recommend it as a clear programming
practice, though!

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4