官术网_书友最值得收藏!

  • The Python Apprentice
  • Robert Smallshire Austin Bingham
  • 163字
  • 2021-07-02 22:16:50

It's a philosophy

Finally, no description of Python would be complete with mentioning that, to many people, Python represents a philosophy for writing code. Principles of clarity and readability are part of what it means to write correct or pythonic code. It's not always clear what pythonic means in all circumstances, and sometimes there may be no single correct
way to write something. But the fact that the Python community is concerned about issues like simplicity, readability, and explicitness means that Python code tends to be more…well…beautiful!

Many of Python's principles are embodied in the so-called Zen of Python. The "zen" isn't a hard-and-fast set of rules, but rather a set of guidelines or touchstones to keep in mind when coding. When you find yourself trying to decide between several courses of action, these principles can often give you a nudge in the right direction. We'll be highlighting elements from the "Zen of Python" throughout this book.

主站蜘蛛池模板: 莫力| 星子县| 民和| 德州市| 黑河市| 洛隆县| 岳普湖县| 淳安县| 博客| 辽阳市| 白水县| 罗定市| 平乡县| 美姑县| 和平区| 方城县| 黔西| 鸡西市| 尼玛县| 翼城县| 溆浦县| 元阳县| 南召县| 郓城县| 即墨市| 河曲县| 固始县| 车致| 平凉市| 诸城市| 孙吴县| 乡城县| 茶陵县| 许昌县| 浦城县| 连南| 老河口市| 云梦县| 缙云县| 敦煌市| 娄烦县|