A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-August/037637.html below:

[Python-Dev] map(None, ...) in tutorial

[Python-Dev] map(None, ...) in tutorial [Python-Dev] map(None, ...) in tutorialNeil Schemenauer nas at python.ca
Thu Aug 14 16:04:47 EDT 2003
Raymond Hettinger wrote:
> No objections, just a couple of thoughts:
> 
> * [(x, square(x) for x in seq]  # this is much nicer

That example is already in the listcomp section of the tutorial.  Now
but I'm wondering if the whole section on multiple arguments to map()
should be removed from the tutorial.  I don't think it's important for
new users to learn it.

> * map(None, 'abc', range(5))  # demonstrates None fill-in 
>                                               # (which zip() doesn't have).

The None fill-in behavior is pretty advanced for the tutorial.  I don't
think I've ever written a map(None, ...) expression that wasn't better
expressed with the newer zip() builtin.

  Neil

More information about the Python-Dev 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