Else statement executing when it shouldnt

Thomas Boell tboell at domain.invalid
Wed Jan 23 12:22:47 CET 2013


On Tue, 22 Jan 2013 17:28:35 -0800 (PST)
alex23 <wuwei23 at gmail.com> wrote:

> On Jan 23, 1:48 am, Thomas Boell <tbo... at domain.invalid> wrote:
> > I must say, that's bound to be confusing for anyone who knows any
> > language other than Python (or none, even).  Syntax like that is "an
> > accident waiting to happen"...
> 
> No, ignorantly expecting every language to conform to every other is
> the pending accident.

Using a keyword that has a well-understood meaning in just about every
other programming language on the planet *and even in English*,
redefining it to mean something completely different, and then making
the syntax look like the original, well-understood meaning -- that's
setting a trap out for users.

The feature isn't bad, it's just very, very badly named.




More information about the Python-list mailing list