Python is readable
rosuav at gmail.com
Thu Mar 15 16:14:54 CET 2012
On Fri, Mar 16, 2012 at 2:05 AM, Kiuhnm
<kiuhnm03.4t.yahoo.it at mail.python.org> wrote:
> I had thought about the single-line case. What I hadn't thought about is
> that Python strives to be as regular as possible, so having different cases
> just for saving one keystroke isn't worth it.
Yep. Have you read the Zen of Python?
>>> import this
(trimmed for brevity)
Explicit is better than implicit.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
In the face of ambiguity, refuse the temptation to guess.
Omitting the colon is definitely a not-special-enough case.
More information about the Python-list