"sins" (aka, acknowledged language problems)
Bijan Parsia
bparsia at email.unc.edu
Mon Dec 27 22:57:58 EST 1999
Alex Martelli <Alex.Martelli at think3.com> wrote:
> Bijan Parsia writes:
>
> > So, you could just use 'for' with the added notion that providing two
> > variables gives you the index in the first one.
> >
> > As I recall, this didn't lead to any confusion in NS.
> >
> > I don't know if this conflicts with already legal Python. But it seems
> > much preferable than a different keyword.
> >
> It would indeed conflict -- "for x, y in e" already has a useful
> meaning when e is a sequence of tuples, as it unpacks each
> tuple into x and y variables.
Hmm. How about, "for index of x,y in e" or "foreach i of x in e" (where
'index' and 'i' are just variables)?
Cheers,
Bijan Parsia
More information about the Python-list
mailing list