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/2005-May/053356.html below:

[Python-Dev] PEP 340: propose to get rid of 'as' keyword

[Python-Dev] PEP 340: propose to get rid of 'as' keyword [Python-Dev] PEP 340: propose to get rid of 'as' keywordGustavo J. A. M. Carneiro gjc at inescporto.pt
Wed May 4 22:21:15 CEST 2005
On Wed, 2005-05-04 at 13:08 -0600, Shane Hathaway wrote:
> Gustavo J. A. M. Carneiro wrote:
> >   In PEP 340 I read:
> > 
> >         block EXPR1 as VAR1:
> >             BLOCK1
> > 
> >   I think it would be much clearer this (plus you save one keyword):
> > 
> >         block VAR1 = EXPR1:
> >             BLOCK1
> 
> I think you misunderstood the statement.  EXPR1 creates an iterator,
> then VAR1 iterates over the values returns by the iterator.  VAR1 never
> sees the iterator.  Using your syntax would reinforce the
> misinterpretation that VAR1 sees the iterator.

  In that case,

      block VAR1 in EXPR1:
          BLOCK1

  And now I see how using 'for' statements (perhaps slightly changed)
turned up in the discussion.

  Sorry for the noise.

-- 
Gustavo J. A. M. Carneiro
<gjc at inescporto.pt> <gustavo at users.sourceforge.net>
The universe is always one step beyond logic

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