logic behind the assert syntax?
Martin von Loewis
loewis at informatik.hu-berlin.de
Tue Aug 29 09:09:32 EDT 2000
Greg Landrum <glandrum at my-deja.com> writes:
> I'll just keep repeating to myself: "Don't feed parens to statements
> which eat commas!" and everything will be fine.
I think many Python users follow the approach: "Don't use any extra
parenthesies!".
So it is
if a==b:
*not*
if(a==b):
it is
return 1,2
*not*
return(1,2)
Even though these are allowed, it'll be much easier if you don't write
the parens. Then not having to use parens in assert, raise, print etc
comes natural.
Regards,
Martin
More information about the Python-list
mailing list