Secret Recipes for the Python Ninja: Over 50 recipes that uncover powerful programming tactics in Python
暫譯: Python 忍者的秘密食譜:超過 50 種揭示 Python 強大編程技巧的食譜
Cody Jackson
- 出版商: Packt Publishing
- 出版日期: 2018-05-19
- 售價: $2,220
- 貴賓價: 9.5 折 $2,109
- 語言: 英文
- 頁數: 380
- 裝訂: Paperback
- ISBN: 1788294874
- ISBN-13: 9781788294874
-
相關分類:
Python、程式語言
-
相關翻譯:
Python 忍者秘籍 (簡中版)
商品描述
Test your Python programming skills by solving real world programming problems covered in the book
Key Features
- Work your way through the standard library and engineer your applications based on appropriate implementations of the library,
- Discover how to make the best use of decorators, context managers, coroutines and generator functions,
- Enhance speed and improve concurrency by conjuring up tricks from the Pypy project.
Book Description
Do you feel you've mastered the Python language and you know everything it takes to write applications that are class apart? Well, you're in for a surprise! This book covers the darkest secrets of Python, delving into its depths and uncovering things you never would have thought could be done.
You'll unearth secrets related to the implementation of the standard library, looking at how the modules actually work. Understanding the implementation of collections, decimal, and fractions modules, along with collections.abc and numbers will surely enable you to do much more than you thought possible. If you haven't used decorators, context managers, coroutines, and generator functions enough, you'll learn from their recipes, what you've been missing out on. We'll cover Internal special methods in detail, showing you what they are and how exactly they can be used to improve the engineering decisions you make. Moving on, you'll explore the CPython interpreter, which is a treasure trove of secret hacks that not many programmers have ventured to understand. We'll take you through the depths of the Pypy project where you'll come across several exciting ways that you can use to improve speed and concurrency.
Finally, we'll take the time to explore the PEPs of the latest versions to excavate some interesting hacks.
What You Will Learn
- Differences between .py files and .pyc files
- Find out about the different ways to install and upgrade Python packages
- The working of the PyPi module that enhances built-in decorators
- Learn how coroutines are different from generators and how they can simulate multithreading
- How the decimal module improves on floating point numbers and its operations
- Standardizing subinterpreters to improve concurrency
- Discovering Python's built-in docstring analyzer
Who This Book Is For
Whether you've been working with Python for a few years or you're a seasoned snake wrangler, you'll have a lot of new tricks to walk away with.
商品描述(中文翻譯)
**測試您的 Python 程式設計技能,通過解決書中涵蓋的現實世界程式問題**
#### 主要特點
- 逐步了解標準庫,並根據庫的適當實現來設計您的應用程式,
- 發現如何充分利用裝飾器、上下文管理器、協程和生成器函數,
- 通過運用 Pypy 專案中的技巧來提升速度和改善併發性。
#### 書籍描述
您是否覺得自己已經掌握了 Python 語言,並且知道編寫出色應用程式所需的一切?那麼,您將會感到驚訝!這本書揭示了 Python 的深層秘密,深入探討其內部運作,揭開您從未想過可以做到的事情。
您將挖掘與標準庫實現相關的秘密,了解模組的實際運作。理解 collections、decimal 和 fractions 模組的實現,以及 collections.abc 和 numbers,將使您能夠做更多您曾經認為不可能的事情。如果您還沒有充分使用裝飾器、上下文管理器、協程和生成器函數,您將從它們的食譜中學到您所錯過的內容。我們將詳細介紹內部特殊方法,告訴您它們是什麼以及如何使用它們來改善您的工程決策。接下來,您將探索 CPython 解釋器,這是一個許多程式設計師未曾深入了解的秘密技巧寶庫。我們將帶您深入 Pypy 專案,您將發現幾種令人興奮的方法來提升速度和併發性。
最後,我們將花時間探索最新版本的 PEP,以挖掘一些有趣的技巧。
#### 您將學到什麼
- .py 檔案和 .pyc 檔案之間的差異
- 了解安裝和升級 Python 套件的不同方法
- 增強內建裝飾器的 PyPi 模組的運作
- 學習協程與生成器的不同之處,以及它們如何模擬多執行緒
- decimal 模組如何改善浮點數及其運算
- 標準化子解釋器以改善併發性
- 發現 Python 內建的文檔字串分析器
#### 本書適合誰
無論您是已經使用 Python 幾年的開發者,還是經驗豐富的 Python 專家,您都將學到許多新技巧。