Python is readable

Chris Angelico rosuav at gmail.com
Thu Mar 15 11:14:54 EDT 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.
Readability counts.
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.

ChrisA



More information about the Python-list mailing list