Writing Idiomatic Python 3.3
暫譯: 撰寫地道的 Python 3.3

Jeff Knupp

  • 出版商: CreateSpace Independ
  • 出版日期: 2013-02-10
  • 售價: $1,350
  • 貴賓價: 9.5$1,283
  • 語言: 英文
  • 頁數: 116
  • 裝訂: Paperback
  • ISBN: 1482374811
  • ISBN-13: 9781482374810
  • 相關分類: Python程式語言
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

相關主題

商品描述

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

商品描述(中文翻譯)

《寫出地道的 Python》一書終於來了!書中充滿了程式碼範例,您將學會以「Pythonic」的方式完成常見任務。每個慣用語都附有詳細的描述、顯示「錯誤」寫法的範例程式碼,以及地道的「Pythonic」替代寫法的程式碼。*本書版本適用於 Python 3,另有 Python 2.7+ 版本可供選擇。*《寫出地道的 Python》包含了最常見和重要的 Python 慣用語,以最大化識別和理解的格式呈現。每個慣用語都作為建議來編寫一些常用的程式碼,並隨後解釋為何該慣用語重要。書中還包含兩個程式碼範例:一個是「有害的」寫法,另一個是「地道的」寫法。*「有害的」寫法幫助您識別自己程式碼中的慣用語。*「地道的」寫法則展示了如何輕鬆將該程式碼轉換為地道的 Python。這本書非常適合您:* 如果您是從其他程式語言轉向 Python * 如果您將 Python 作為第一門程式語言學習 * 如果您希望提高 Python 程式碼的可讀性、可維護性和正確性 什麼是「地道的」Python?每種程式語言都有其自己的慣用語。程式語言的慣用語不過是編寫某段程式碼的普遍接受方式。持續編寫地道的程式碼有許多重要的好處:* 其他人可以輕鬆閱讀和理解您的程式碼 * 其他人可以以最小的努力維護和增強您的程式碼 * 您的程式碼將包含更少的錯誤 * 您的程式碼將教導他人無需您額外努力即可編寫正確的程式碼