Why '==' ??
Diez B. Roggisch
deetsNOSPAM at web.de
Tue Mar 30 08:29:01 EST 2004
> It's possible there are places where the interpreter could fail to
> understand it, but I haven't found them yet. If there *aren't* any
> situations where one could be confused for the other... then it's not
> needed and is annoying :-)
Thats a matter of taste - its easy to spot a comparision, and typing an
additional "=" if you're already over the key - well, python spares me so
wuch typing, I can live with that.
> The same could equally well be true for the trailing ':' after def, if
> etc statements..............
You are allowed to write
if cond: expression
so the colon makes sense here I believe. And as someone who loathed the
rules for ".", ",", ";" placement in pascal, I can live with the colon even
if a newline appears after the if/def/whatever. Think of the coding
conventions for C or JAVA that forbid the usage of
if(cond)
statement;
and instead insist on {} put around the statements.
Too much freedom in syntax leads to religious wars waged over the style to
use - I'm glad that python lacks that stylewars.
--
Regards,
Diez B. Roggisch
More information about the Python-list
mailing list