Writing Idiomatic Python 3.3
Jeff Knupp
- 出版商: CreateSpace Independ
- 出版日期: 2013-02-10
- 售價: $1,340
- 貴賓價: 9.5 折 $1,273
- 語言: 英文
- 頁數: 116
- 裝訂: Paperback
- ISBN: 1482374811
- ISBN-13: 9781482374810
-
相關分類:
Python、程式語言
海外代購書籍(需單獨結帳)
買這商品的人也買了...
-
$660$627 -
$301神經網絡與深度學習
-
$1,617Deep Learning (Hardcover)
-
$590$460
相關主題
商品描述
The "Writing Idiomatic Python" book is finally here! Chock full of code samples, you'll learn the "Pythonic" way to accomplish common tasks. Each idiom comes with a detailed description, example code showing the "wrong" way to do it, and code for the idiomatic, "Pythonic" alternative. *This version of the book is for Python 3. There is also a Python 2.7+ version available.* "Writing Idiomatic Python" contains the most common and important Python idioms in a format that maximizes identification and understanding. Each idiom is presented as a recommendation to write some commonly used piece of code. It is followed by an explanation of why the idiom is important. It also contains two code samples: the "Harmful" way to write it and the "Idiomatic" way. * The "Harmful" way helps you identify the idiom in your own code. * The "Idiomatic" way shows you how to easily translate that code into idiomatic Python. This book is perfect for you: * If you're coming to Python from another programming language * If you're learning Python as a first programming language * If you're looking to increase the readability, maintainability, and correctness of your Python code What is "Idiomatic" Python? Every programming language has its own idioms. Programming language idioms are nothing more than the generally accepted way of writing a certain piece of code. Consistently writing idiomatic code has a number of important benefits: * Others can read and understand your code easily * Others can maintain and enhance your code with minimal effort * Your code will contain fewer bugs * Your code will teach others to write correct code without any effort on your part
商品描述(中文翻譯)
《Writing Idiomatic Python》這本書終於問世了!內容豐富,包含大量的程式碼範例,讓你學習以「Pythonic」的方式完成常見任務。每個慣用語都附有詳細的描述,示範了「錯誤」的寫法,以及符合慣用語的「Pythonic」替代方案的程式碼。
*這本書的版本適用於Python 3,也有Python 2.7+版本可供選擇。*
《Writing Idiomatic Python》以最大化辨識和理解的方式呈現了最常見和重要的Python慣用語。每個慣用語都被視為撰寫某些常用程式碼的建議,並附有解釋為何該慣用語重要的說明。書中還包含兩個程式碼範例:「有害」的寫法和「慣用」的寫法。
*「有害」的寫法有助於你在自己的程式碼中辨識慣用語。
*「慣用」的寫法則展示了如何輕鬆將該程式碼轉換為慣用的Python寫法。
這本書非常適合以下人士閱讀:
* 如果你從其他程式語言轉到Python
* 如果你將Python作為第一個程式語言學習
* 如果你希望提高Python程式碼的可讀性、可維護性和正確性
什麼是「慣用」的Python?
每種程式語言都有其慣用語。程式語言的慣用語僅僅是寫特定程式碼的普遍接受方式。始終以慣用的方式撰寫程式碼有許多重要的好處:
* 別人可以輕鬆閱讀和理解你的程式碼
* 別人可以以最小的努力維護和增強你的程式碼
* 你的程式碼將包含較少的錯誤
* 你的程式碼將教導他人如何輕鬆撰寫正確的程式碼,而無需你的努力