Another conditional expression candidate (PEP 308)

Andrew Koenig ark at research.att.com
Sun Feb 9 21:48:47 EST 2003


Roy> If "else: pass" isn't required in the statement, why should
Roy> "else: None" be required in the expression?

Because "pass" is obviously the only sensible default behavior for
statements, but None is not obviously the only sensible default value
for conditional expressions.

-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark




More information about the Python-list mailing list