Expert Python Programming (2nd Edition) cover

Expert Python Programming (2nd Edition)

Rating 3.6
Word count
365 words
Chapters
15
ISBN
9787115460158

Tags

Summary

Expert Python Programming (2nd Edition) is a technical book for advancing your Python skills. The original work is the second edition of Expert Python Programming, co-authored by Polish developer Michał Jaworski and French developer Tarek Ziadé, and translated by Zhang Liang and Axin. The book primarily covers Python 3.5, starting with the current state and ecosystem of the Python language, then discussing the differences between Python 3 and Python 2, the PEP documentation mechanism, implementations beyond CPython, and environment isolation solutions at the application and system levels (including virtual machines and containers). The first half of the main text focuses on syntax and naming: strings and bytes, collection types, iterators, yield, decorators, context managers, as well as subclassing built-in types, method resolution order, descriptors, properties, metaclasses, and PEP 8 naming conventions. The middle section shifts to engineering practice: writing and publishing Python packages, deploying code, writing extensions with C/C++/Cython/ctypes/CFFI, version control and continuous integration, documenting projects, and test-driven development. The later section covers general principles of performance optimization and bottleneck analysis, practical techniques such as reducing complexity and caching, as well as multithreading, multiprocessing, and async/await asynchronous programming, finally summarizing design patterns including singleton, adapter, proxy, facade, observer, visitor, and template. Combining development case studies, the book aims to help readers write high-performance, reliable, and maintainable Python applications.

Editor's review

市面上多数 Python 书停在语法和入门项目,这本书却从“能写代码”跨到“能交付项目”。它把很多开发者零散学到的东西串成一条完整线索:先讲语言现状和版本差异,避免踩 Python 2/3 的老坑;再讲装饰器、描述符、元类这些让代码更优雅的语法;接着直接进入打包、部署、写 C 扩展、版本控制、持续集成、文档和测试驱动开发——这些正是从“程序员”走向“工程师”必须补齐的环节。第 11 至 13 章讲优化与并发,先教你怎么找瓶颈,再讲多线程、多进程和 async/await 的适用边界,比只给代码片段的书更讲清楚“为什么”。最后一章把设计模式放回真实场景,单例、适配器、观察者都用 Python 的方式实现。张亮、阿信的译文术语规范、行文顺畅。原书基于 Python 3.5,部分工具和库已有更新,但方法论和工程思路并不过时,适合作为案头参考反复翻阅。

Who it's for

A good fit for

  • 已掌握 Python 基础语法、写过小项目,想系统补齐工程实践的开发者
  • 需要在团队中负责打包、部署、持续集成与代码质量管理的中级工程师
  • 从其他语言转 Python、想快速了解 Python 生态规范与最佳实践的程序员
  • 准备技术面试或想梳理 Python 进阶知识体系的高年级学生

Not a good fit for

  • 完全没有编程基础、想从零学习 Python 语法的初学者
  • 只想要一本爬虫、数据分析或 Web 框架快速上手教程的读者
  • 期待内容与 Python 3.11+ 新特性完全同步的读者

Reading tips

  1. 建议先通读第 1 至 3 章打牢语法与版本认知,再按项目需要跳读打包、部署、测试等章节。
  2. 读到装饰器、元类、描述符时,务必在本地动手复现代码示例,理解比记住更关键。
  3. 第 11 至 13 章的优化与并发内容,建议配合自己项目中的真实瓶颈练习,效果最好。
  4. 书中涉及的第三方库版本较旧,实践时请以官方文档的最新用法为准,注意甄别。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Preface
  2. Chapter 1 Current State of Python
  3. Chapter 2 Syntax Best Practices—Below the Class Level
  4. Chapter 3 Syntax Best Practices—Above the Class Level
  5. Chapter 4 Choosing Good Names
  6. Chapter 5 Writing a Package
  7. Chapter 6 Deploying Code
  8. Chapter 7 Developing Python Extensions with Other Languages
  9. Chapter 8 Managing Code
  10. Chapter 9 Documenting Your Project
  11. Chapter 10 Test-Driven Development
  12. Chapter 11 Optimization—General Principles and Profiling Techniques
  13. Chapter 12 Optimization—Some Powerful Techniques
  14. Chapter 13 Concurrency
  15. Chapter 14 Useful Design Patterns

FAQ

这本书需要什么基础才能读?
需要比较熟练地使用 Python 基础语法,写过至少一个小项目,了解函数、类、模块和虚拟环境的概念。书中直接进入装饰器、元类、打包部署等话题,零基础读者会感到吃力。
第2版和第1版有什么区别?
第1版由 Tarek Ziadé 独著、2010 年出版,侧重最佳实践与敏捷开发;第2版由 Michał Jaworski 与 Tarek Ziadé 合著,基于 Python 3.5 重写扩充,新增环境隔离、容器化、C/C++ 扩展、持续集成、异步编程等内容。
书里的内容现在过时了吗?
本书基于 Python 3.5,个别工具与库的用法已有变化,例如打包工具链、异步写法等。但语法最佳实践、工程流程、优化思路和设计模式等核心内容仍然适用,可配合最新文档阅读。
这本书适合当教材系统学习吗?
它更像进阶参考书而非入门教材,章节之间相对独立。适合作为学习路线中的第二、三本书,或作为工作中遇到打包、部署、性能、并发问题时的案头查阅工具。
读完后能达到什么水平?
读者应能独立完成包的编写与发布、搭建持续集成与测试流程、为项目编写文档、用 C 扩展或 Cython 优化热点代码,并能根据场景选择多线程、多进程或异步方案。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

More by the same author

Top rated in the same category