A RetroSearch Logo

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

Search Query:

Showing content from http://www.python.org/pipermail/python-dev/2000-July/006829.html below:

[Python-Dev] PEP 201 - Parallel iteration

[Python-Dev] PEP 201 - Parallel iterationGordon McMillan gmcm@hypernet.com
Mon, 17 Jul 2000 16:22:45 -0400
Barry A. Warsaw wrote:

[PEP 201, Parallel Iteration]

> Open Issues
> 
>     - What should "zip(a)" do?  Given
> 
>       a = (1, 2, 3); zip(a)
> 
>       three outcomes are possible.

How about a fourth: zip(a) is the same as zip(a, []) ?

Look at it this way: what should zip(a, pad=None) return?

Obviously: [(1, None), (2, None), (3, None)]

So what should zip(a) return? Don't special case it, just return 
[].

With only one arg, zip has clearly lost meaning. That is, it's 
clearly a degenerate case, and not worth a bunch of special 
casing.

although-we-do-special-case-Barry-ly y'rs

- Gordon



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