Core Python Programming (2nd Edition) cover

Core Python Programming (2nd Edition)

Rating 3.9
Word count
1.3M words
Chapters
25
ISBN
9787115178503

Tags

Summary

This book is a classic advanced title in the Python field. The original is Core Python Programming, 2nd Edition, fully updated for Python 2.5. The book is organized in two major parts: the first, about two-thirds of the length, covers the 'core' of the language, from syntax and style, Python objects and the memory model, to numeric types, sequence types (strings, lists, tuples), mapping and set types, conditionals and loops, files and input/output, error and exception handling, functions and functional programming, modules, object-oriented programming, and the interpreter's execution environment; the second part turns to advanced application topics, covering regular expressions, network programming and network client programming, multithreading, graphical user interfaces (Tkinter and others), Web programming, database programming (MySQL, Postgres, SQLite, etc.), and extending Python with languages such as C. Each chapter ends with exercises ranging from beginner to intermediate difficulty, with partial solutions in the back, so readers can test what they have learned hands-on. The author emphasizes professional Python style and best practices throughout, hoping readers will not only learn what 'runs' but also understand the object model and runtime mechanisms behind the language. The book is aimed at readers with some programming background who want to master Python systematically and delve into real development scenarios; it is not suitable as a first book for complete beginners.

Editor's review

对 Python 核心特性的系统化讲解,是这本书多年来被反复推荐的原因。它不满足于罗列语法,而是把对象模型、内存管理、函数式编程、类的设计等关键概念讲透,让读者从“会写脚本”走向“能设计程序”。结构上“核心 + 高级主题”的分法非常实用:前 14 章打地基,后 9 章可直接按需查阅,正则表达式、网络、多线程、GUI、Web、数据库与 C 扩展一门不缺,覆盖了当年 Python 开发者的大部分主要战场。书中图表清楚,对模块、操作符、函数和方法的归纳便于速查;示例从小的代码片段到功能完整的应用都有,适合边读边敲。每章习题由浅入深,配解答自测,学习路径完整。需要提醒的是,本版面向 Python 2.5,print 语句、字符串默认编码、urllib 等写法与 Python 3 差异明显,阅读时应当对照现代写法做迁移,把它当成理解概念与体系的参考,而非可直接照抄的代码手册。

Who it's for

A good fit for

  • 已有其他语言基础、想系统建立 Python 知识体系的开发者
  • 学过 Python 语法,希望深入理解对象模型与面向对象设计的读者
  • 需要查阅正则、网络、多线程、数据库、GUI 等实用主题的工程人员
  • 希望通过每章习题自测、把知识真正落地的自学者

Not a good fit for

  • 完全没有编程经验的零基础读者,建议先读更浅显的入门书
  • 只想学 Python 3 现代语法与最新生态、不愿做版本迁移的读者
  • 寻找框架实战项目(如数据分析、机器学习)的读者,本书侧重语言与通用应用

Reading tips

  1. 先通读第 1 部分,把对象、类型、函数与类吃透,再按需跳跃选读高级章节。
  2. 边读边敲代码,优先在 Python 3 环境复现示例,留意 print、字符串与 urllib 等差异并记录迁移写法。
  3. 每章习题至少动手完成一半,把报错与调试过程记成笔记,效果远超单纯阅读。
  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. Part 1: Python Core
  2. Chapter 1: Welcome to the Python World
  3. Chapter 2: Quick Start
  4. Chapter 3: Python Basics
  5. Chapter 4: Python Objects
  6. Chapter 5: Numbers
  7. Chapter 6: Sequences: Strings, Lists, and Tuples
  8. Chapter 7: Mapping and Set Types
  9. Chapter 8: Conditionals and Loops
  10. Chapter 9: Files and Input/Output
  11. Chapter 10: Errors and Exceptions
  12. Chapter 11: Functions and Functional Programming
  13. Chapter 12: Modules
  14. Chapter 13: Object-Oriented Programming
  15. Chapter 14: Execution Environment
  16. Part 2: Advanced Topics
  17. Chapter 15: Regular Expressions
  18. Chapter 16: Network Programming
  19. Chapter 17: Network Client Programming
  20. Chapter 18: Multithreaded Programming
  21. Chapter 19: Graphical User Interface Programming
  22. Chapter 20: Web Programming
  23. Chapter 21: Database Programming
  24. Chapter 22: Extending Python
  25. Chapter 23: Other Topics

FAQ

这本书适合零基础读者吗?
不太适合。书中虽有快速入门章节,但整体定位是进阶,作者假定读者已有一定编程经验。零基础读者可先用更浅显的入门书打底,再来读本书理解对象模型与高级主题。
这本第二版讲的是 Python 2 还是 Python 3?
本版针对 Python 2.5 编写,代码示例使用 print 语句等 Python 2 写法。阅读时应主动对照 Python 3 改写,把重点放在概念与设计思想上。
它和《Python核心编程(第3版)》有什么区别?
第 3 版由孙波翔、李斌、李晗翻译,2016 年出版,原书为 Core Python Applications Programming,主要讲应用与 Web 开发,不再系统讲语言基础。第二版则是语言核心加高级主题的完整体系,两者可以互补。
书中的习题有答案吗?
部分习题的解答附在书后,但并非全部。多数习题需要自己动手调试,这正是本书训练编程能力的方式;遇到卡壳可结合社区讨论与官方文档解决。

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