Please tell me what the following sentence means in 'The Zen of Python'.
"Although that way may not be obvious at first unless you’re Dutch."
Thanks in advance.
The Zen of Python is a collection of 19 "guiding principles" for writing computer programs that influence the design of the Python programming language. Software engineer Tim Peters wrote this set of principles and posted it on the Python mailing list in 1999.
Thanks to his contribution, anyone can view the Zen straight from the Python interpreter by typing import this : >>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit.
Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess.
I suggest that it is PEP 20. Very zen. Show activity on this post. 20: "You must discover this for yourself, grasshopper."
It is a reference to the fact that Python's creator, Guido van Rossum, is Dutch.
When Python was not so popular, and mostly used by scripters and IT people to avoid bash monsters, features and modules and stuff went into the language without pondering over them as much as today.
A simple example: the backtick
operator was syntactic sugar for repr().
The "one obvious way to do it" was opposed to the "many ways to do it" of Perl, and the backtick is a perlism that Python has since lost.
Apart from a few small things like that, Guido has always strived to keep the language consistent, balancing between pragmatism and minimalism. It took several years of discussions in comp.lang.python before adding a ternary operator.
The sentence you quote is Tim Peter's way to suggest that people should not lobby for their favourite features, borrowing them from other languages, when Python already has its way to accomplish the same results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With