On 2012-10-14 03:25, Steven D'Aprano wrote:
On Sat, 13 Oct 2012 15:24:04 -0700, nbvfour wrote:

On Saturday, October 13, 2012 2:33:43 PM UTC-4, Chris Angelico wrote:

Nice theory, but this is the bit that I fundamentally disagree with.
Forcing programmers to work in one particular style is usually not the
job of the language/framework/library. That should be up to the
programmer, or at least the local style guide.

Have you ever read the zen of python? "Theres only one way to do it" is
a core motto of the python language.

Have *you* ever read the Zen of Python? The line from the Zen is:

"There should be one-- and preferably only one --obvious way to do it."

Paraphrasing for emphasis:

There SHOULD be one (or more, but one is best) OBVIOUS way to do it.

as opposed to languages where there are no obvious ways to things, or
thirty.

Don't believe me that the emphasis is on *obvious* rather than "only"?
The very next line of the Zen tells you:

"Although that way may not be OBVIOUS at first unless you're Dutch."

[emphasis added]

Not being Dutch, I don't know whether the obvious way to do command line
argument handling is the getopt module or argparse. But there certainly
isn't *only one way* to do command line argument handling.

It is a gross canard, mostly spread by Perl programmers, that Python is
"limited" to "only one way to do it" and therefore isn't as good as Perl
which gives you "more freedom" (to write unreadable, unmaintainable code).

It simply isn't true that Python only gives you "only one way". The
acronym OOWTDI stands for *one obvious way to do it*.

I think it's the "Paradox of Choice".

The more choices there are, the more time you'll spend trying to decide
which one is "best".

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to