On Thu, 2017-11-02 at 08:29 +1100, Chris Angelico wrote:
> On Thu, Nov 2, 2017 at 8:23 AM, Ned Batchelder <n...@nedbatchelder.com
> > wrote:
> >
> >
> > Apart from the questions of backward compatibility etc (Python is
> > unlikely
> > to ever go through another shift like the 2/3 breakage), are you
> > sure "then"
> > is what you mean?  This won't print "end":
> >
> >     for i in range(10):
> >         print(i)
> >     else:
> >         print(end)
>
> Well, it'll bomb with NameError when it tries to look up the *name*
> end. But it will run that line of code - if you quote it, it will
> work.

You see how people are confused over "for ... else".

Alexey.

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to