A Byte of Python
Tags
Summary
Among introductory Python books, what sets this one apart is not completeness but brevity. In just over a hundred pages, the author explains the language's basic building blocks one by one in an almost conversational tone: variables, expressions, control flow, functions, modules, data structures, classes, and exceptions, each accompanied by short examples, so that almost no prior knowledge is required. It first circulated online as a free book that could be freely downloaded, translated, and shared, and over the years it has accumulated a large number of "my first programming book"-style praise. One caveat: the book is essentially a guided tutorial. It helps you build a conceptual framework and get your first program running, but it does not go deep into performance, engineering practice, or the vast third-party ecosystem; its Python 2-related content is also clearly outdated. The ideal way to use it is as a map for beginners: open your editor and type along as you read, then move straight on to the official documentation or more systematic project practice. Chinese readers should also note the differences between editions: Shen Jieyuan's translation corresponds to the earlier version 1.20, with gentle language but older examples; Molun's translation corresponds to version 4.0, centers on Python 3, and is better suited to today's learning environment.
Editor's review
在 Python 入门书里,这本书的独特之处不是“全”,而是“少”。一百多页的篇幅,作者用近乎聊天的语气把语言的基本构件一件件交代清楚:变量、表达式、控制流、函数、模块、数据结构、类、异常,每一处都配合短小的示例,读起来几乎不需要前置知识。它最初以自由图书的形式在网上流传,可以被免费下载、翻译和传播,因此在不同年代累积了大量“我的第一本编程书”式的好评。需要提醒的是,本书本质上是一份导览性教程:它帮你建立概念框架、顺利跑通第一个程序,但不会深入讲性能、工程实践或庞大的第三方生态;其中涉及的 Python 2 相关内容也已明显过时。比较理想的使用方式,是把它当作一张入门地图,在读书的同时就打开编辑器动手敲,读完之后立刻转入官方文档或更系统的项目实践。中文读者还需注意版本差异:沈洁元译本对应较早的 1.20 版,语言温和但示例偏旧;漠伦译本对应 4.0 版,以 Python 3 为主线,更适合当下的学习环境。
Who it's for
A good fit for
- 完全没有编程经验的零基础读者,从第一个程序学起
- 有其他编程语言基础、想用最短时间了解 Python 语法的人
- 需要一本篇幅可控、可在几天内读完后动手实践的自学者
- 想把 Python 入门内容作为课程导读材料的中小学或高校教师
Not a good fit for
- 希望系统掌握标准库、并发、Web 框架或数据科学的进阶开发者
- 需要权威语法参考手册、遇到问题能快速检索细节的读者
- 只接受纸质正式出版、重视完整配套习题与答案的读者
Reading tips
- 边读边敲:每读完一节就在本地环境复现示例,不要只看不写。
- 优先选择基于 Python 3 的新译本,遇到书中涉及 Python 2 的段落可略读。
- 把第 10 章的脚本练习当作检验,独立完成一遍再对照书中的写法。
- 读完后衔接官方教程或项目实战书,补上工程实践与第三方库的内容。
Contents
- Preface
- Chapter 1 Introduction
- Chapter 2 Installing Python
- Chapter 3 First Steps
- Chapter 4 Basic Concepts
- Chapter 5 Operators and Expressions
- Chapter 6 Control Flow
- Chapter 7 Functions
- Chapter 8 Modules
- Chapter 9 Data Structures
- Chapter 10 Solving Problems: Writing a Python Script
- Chapter 11 Object-Oriented Programming
- Chapter 12 Input and Output
- Chapter 13 Exceptions
- Chapter 14 The Python Standard Library
- Chapter 15 More Python
- Chapter 16 What to Learn Next
- Appendix A Free and Open Source Software (FLOSS)
- Appendix B About the Book
- Appendix C Revision History
FAQ
这本书有正式出版的中文纸书吗?
它最初是以自由图书形式在网上传播的,中文版长期以电子文档和在线阅读为主。豆瓣收录的版本标注出版方为 Lulu Marketplace、2008 年出版、译者沈洁元,属于按需印刷性质的版本,国内并无通行的正式出版社版本,读者多以免费译本为主。
沈洁元译本和漠伦译本有什么区别?
沈洁元译本依据原书 1.20 版完成,2005 年推出,是最早也流传最广的中文译本;漠伦译本依据原书 4.0 版于 2017 年重新翻译,以 Python 3 为主线,内容更新,书末标注版本为 4.08c。
零基础直接读这本书够用吗?
作为第一本书是够的,它把语言基本构件讲得清楚且篇幅短。但它不覆盖第三方库、工程工具与项目实践,学完后应尽快进入实际项目或更系统的教材,否则容易停在“会语法但不会做事”的阶段。
书里的代码还能直接运行吗?
多数基础语法示例在 Python 3 下仍然近似可用,但涉及 Python 2 的输入输出写法、print 语句等会报错。建议使用 Python 3 环境,并优先参考以 Python 3 为基础的新译本。
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.