| Tip 2 | Import This |
★2.7, 3.4+ Every Python installation comes with the module named this. The module has nothing to do with the namesake Java or C++ keyword denoting a reference to a class object. The module contains The Zen of Python—a set of guiding principles that define the “Pythonic” programming style. Just like with any other kind of Zen, the Zen of Python is learned by practicing. Practicing meditation does not hurt, but practicing good programming helps. Let’s start our practice by looking at the principles first. Type:
| | import this |
And you will see The Zen of Python.
I will occasionally refer to some of these principles throughout the rest of the book.
For a reason beyond my understanding (probably Zen-related), The Zen of Python ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access