Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this sentence mean in 'The Zen of Python'?

Tags:

python

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.

like image 783
satoru Avatar asked Mar 18 '10 14:03

satoru


People also ask

What is the meaning of Zen of Python?

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.

How do I show Zen in Python?

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.

What is the 5th aphorism of the Zen of Python?

Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess.

What is the 20th aphorism of the Zen of Python?

I suggest that it is PEP 20. Very zen. Show activity on this post. 20: "You must discover this for yourself, grasshopper."


2 Answers

It is a reference to the fact that Python's creator, Guido van Rossum, is Dutch.

like image 98
Andrew Hare Avatar answered Oct 11 '22 00:10

Andrew Hare


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.

like image 35
Marco Mariani Avatar answered Oct 10 '22 23:10

Marco Mariani