[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
- Previous message: [Python-Dev] Adding a conditional expression in Py3.0
- Next message: [Python-Dev] Adding a conditional expression in Py3.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
?
- Previous message: [Python-Dev] Adding a conditional expression in Py3.0
- Next message: [Python-Dev] Adding a conditional expression in Py3.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]