[Python-Dev] Adding a conditional expression in Py3.0 (original) (raw)

Andrew Koenig ark at acm.org
Thu Sep 22 16:57:06 CEST 2005


My problem with this syntax is that it can be hard to read:

return if self.arg is None then default else self.arg looks worryingly like return NAME NAME.NAME NAME NAME NAME NAME NAME NAME.NAME to me.

Interesting. What about

return if self.arg is None: default else: self.arg

?



More information about the Python-Dev mailing list