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/2000-July/007451.html below:

[PEP202 listcomps] (was RE: [Python-Dev] Product iteration)

[PEP202 listcomps] (was RE: [Python-Dev] Product iteration)Thomas Wouters thomas@xs4all.net
Wed, 26 Jul 2000 22:02:17 +0200
On Wed, Jul 26, 2000 at 08:00:33AM -0500, Guido van Rossum wrote:
> > is there any special reason why we cannot use colon instead
> > of "for"?

> Would conflict with the proposed syntax for range literals.  Both
> 
>   [0:10]
> 
> and

>   [x : x in seq]

> have the same syntactical form.

Much, much worse: the latter *is* a range literal. It's not likely to
produce anything useful, depending on 'x', but it is a valid range literal.

(It'll create a range from 'x' to '0', if 'x' is not in 'seq', or '1', if
'x' is in 'seq', using step 1.)

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!



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