PEP 308: Alternative conditional operator forms

Tim Rowe tim at remove_if_not_spam.digitig.co.uk
Fri Feb 21 16:11:14 CET 2003


Michele Simionato wrote:
> I tested the proposed syntax showing it to my girlfriend (see the
> thread
> on usability studies). She is an happy non-programmer and found the 
> 
> z=(if C: x else: y)
> 
> construct very hard to read, much harder than
> 
> z=x if C else y

Did you ask her how easily she understood:
if C:
    z = x
else:
    z = y

by any chance? :-)	





More information about the Python-list mailing list