Learning Python, 5th Edition (Chinese Translation)

Mark LutzChina Machine Press2018

Rating 4.0
Chapters
40
Series
O'Reilly Animal Series (Chinese Edition)
ISBN
9787111603665

Tags

Computing Software TutorialsProgramming Human NatureHumanistic CareLife PhilosophyComplex HumanityPsychological InsightGrowing UpDaily ReflectionsSocial CritiqueStep-by-Step GuideFemale Perspective

Summary

This book is the Chinese translation of the fifth edition of Learning Python, O'Reilly's classic Python tutorial. Its author, Mark Lutz, is an instructor who has long taught Python training courses, and the book grew out of the courses he taught over many years. The book focuses on Python 3.3 while also covering Python 2.7, and it explains the differences between these two major versions and other common versions, so readers can follow along regardless of which version they use. The content advances layer by layer through the language's mechanisms: it first introduces Python's place, the interpreter, and ways to run programs, then systematically covers built-in object types (numbers, strings, lists, dictionaries, tuples, files, and so on) and the dynamic typing model; it then moves on to statements and syntax (assignment, if tests, while/for loops, iteration and comprehensions, documentation tools), followed by functions, scopes, arguments, generators, and modules and packages, before devoting considerable space to classes and object-oriented programming, operator overloading, and class design, and finally covering the exception-handling mechanism as well as advanced topics such as Unicode and byte strings, managed attributes, decorators, and metaclasses. Each chapter of the book is built around a single key concept and includes numerous annotated examples and diagrams; every chapter ends with "brain teaser" questions and programming exercises, and answers to the exercises are provided at the end of each part, making this a step-by-step self-study tutorial. It is a thick volume, suitable for use as a long-term language reference. Both the traditional Chinese and simplified Chinese editions are published in two volumes, totaling more than 1,500 pages.

Editor's review

在 Python 入门书里,《Python学习手册》属于“厚而全”的一类:它不追求让读者三天做出项目,而是把语言本身的机制讲透。作者是长期讲授 Python 课程的培训讲师,书中带着明显的“课堂感”——每一章先给出问题场景,再解释语法背后的运行逻辑,最后用脑力测试和习题收尾,读者可以跟着自测是否真的读懂。 第五版的价值在于它同时覆盖 Python 3.3 与 2.7,并专门说明两者差异:动态类型、可变与不可变、引用与副本、作用域规则(LEGB)、迭代协议、描述符与元类这些常被一句话带过的概念,在这里都有分章展开。对于只会“照抄代码”的自学者,这类解释能帮助补上从语法到语言的中间环节。 中文版由秦鹤、林明翻译,分为上下两册、一千五百余页,纸质版分量不轻,更像一本可以放在手边翻查的语言字典。需要提醒的是,成书时间较早,书中未涉及类型注解、异步编程等近年常用内容,版本示例也停留在 3.3;把它当作打基础的语言教材,再配合官方文档和新版教程使用,效果最好。

Who it's for

A good fit for

Not a good fit for

Reading tips

  1. 第一遍按章顺序读,每章的脑力测试先自己答,再对照答案找薄弱点
  2. 边读边在解释器里敲示例,把每个示例改动一次再运行,观察结果差异
  3. 把 3.X 与 2.X 差异标注当作背景知识,现代的练习请统一在 3.X 环境下进行
  4. 第二遍只精读函数作用域、引用与副本、类与描述符、装饰器、元类等难点章节

About the publisher

China Machine Press China · Founded in 1950

In addition to science and technology and professional publishing, the books in our catalog from China Machine Press also reflect a sustained focus on psychology, computing, management, finance and economics, and social sciences. In psychology, the catalog includes works by C. G. Jung and introductions to analytical psychology, as well as applied topics such as stress and health, and addiction and healing. In computing, it features Structure and Interpretation of Computer Programs (JavaScript Edition). Management and finance titles include Administrative Behavior (4th Edition), The Price of Inequality (Collector's Edition), and This Time Is Different: Eight Centuries of Financial Folly (Commemorative Edition). In the philosophy and history of science, there is The Worldview: The Third Edition. Relevant authors include C. G. Jung, William McGuire, Sonu Shamdasani, and Gabor Maté. Public information is limited; the above summarizes the publisher's profile based solely on the books in our catalog.

Contents

  1. Volume 1: Preface
  2. Part I: Getting Started
  3. Chapter 1: A Python Q&A Session
  4. Chapter 2: How Python Runs Programs
  5. Chapter 3: How You Run Programs
  6. Part II: Types and Operations
  7. Chapter 4: Introducing Python Object Types
  8. Chapter 5: Numeric Types
  9. Chapter 6: The Dynamic Typing Interlude
  10. Chapter 7: String Fundamentals
  11. Chapter 8: Lists and Dictionaries
  12. Chapter 9: Tuples, Files, and Everything Else
  13. Part III: Statements and Syntax
  14. Chapter 10: Introducing Python Statements
  15. Chapter 11: Assignments, Expressions, and Prints
  16. Chapter 12: if Tests and Syntax Rules
  17. Chapter 13: while and for Loops
  18. Chapter 14: Iterations and Comprehensions
  19. Chapter 15: The Documentation Interlude
  20. Part IV: Functions and Generators
  21. Chapter 16: Function Basics
  22. Chapter 17: Scopes
  23. Chapter 18: Arguments
  24. Chapter 19: Advanced Function Topics
  25. Chapter 20: Comprehensions and Generations
  26. Chapter 21: Benchmarking Interlude
  27. Part V: Modules and Packages
  28. Chapter 22: Modules: The Big Picture
  29. Chapter 23: Module Coding Basics
  30. Chapter 24: Module Packages
  31. Chapter 25: Advanced Module Topics
  32. Volume 2: Part VI: Classes and OOP
  33. Chapter 26: OOP: The Big Picture
  34. Chapter 27: Class Coding Basics
  35. Chapter 28: A More Realistic Example
  36. Chapter 29: Class Coding Details
  37. Chapter 30: Operator Overloading
  38. Chapter 31: Designing with Classes
  39. Chapter 32: Advanced Class Topics
  40. Part VII: Exceptions and Tools

FAQ

这本书适合零基础学 Python 吗? 可以读,但不是最省时的选择。书中从最基本的对象类型讲起,不预设其他语言基础,且有习题和解答;但它篇幅长、节奏偏慢,零基础读者最好配合一个实际小项目,避免长时间只读不写。
第五版覆盖哪些 Python 版本? 第五版以 Python 3.3 为主体,同时兼顾 Python 2.7,并说明两者差异。书中没有涉及类型注解、async/await 等较新特性,用现代 Python 练习时以示例概念为主即可。
中文版一共有几册、多少页? 机械工业出版社中文版为上下两册合售,约一千五百余页(不同渠道标注 1467—1514 页不等),ISBN 为 9787111603665,2018 年出版。
和《流畅的 Python》该怎么选? 本书是语言基础教程,重在把语法和运行机制讲全讲透,适合作为第一本系统教材;《流畅的 Python》面向已有一定经验的读者,讲惯用法与设计思路。两者定位不同,可以先用本书打底,再读进阶书。
书中的脑力测试和习题有答案吗? 有。每章末尾的“脑力测试”随后附有答案,各部分末尾的编程练习解答集中放在书末附录“各部分练习题解答”中,便于自学者自检。

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.

About the author

Mark Lutz Author

Mark Lutz is a technical author long engaged in Python teaching and writing. Public information about him is limited, and details such as his nationality and dates of birth and death remain unclear. The Chinese book database includes five of his works, with the representative titles being the fifth and fourth editions of Learning Python. These books cover Python's basic syntax, core mechanisms, and practical applications, and fall under computer science, software learning, and programming design. His writing is known for being substantial, rich in examples, and detailed in explanation, helping readers move gradually from beginner level to a deeper understanding of the language's features. As a result, he is widely recognized among Python learners, and his books are often used as reference works for systematic study of the language.