Skip to Content
《学习 Python》第 5 版
book

《学习 Python》第 5 版

by Mark Lutz
May 2025
Intermediate to advanced
1648 pages
23h 5m
Chinese
O'Reilly Media, Inc.
Content preview from 《学习 Python》第 5 版

序言

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

如果你站在书店里寻找这本书的短篇小说,不妨试试这个:

  • Python是一种功能强大的多范式计算机编程语言,针对程序员的工作效率、代码可读性和软件质量进行了优化。

  • 本书全面深入地介绍了 Python 语言本身。其目标是帮助您掌握 Python 基础知识,然后再将其应用到工作中。与之前的所有版本一样,本书旨在为所有 Python 新手提供单一的、包罗万象的学习资源,无论他们将使用 Python 2.X、Python 3.X,还是两者兼而有之。

  • 本版根据 Python 3.3 和 2.7 版本进行了更新,并进行了大幅扩充,以反映 Python 世界的最新实践。

本序言更详细地介绍了本书的目标、范围和结构。这是选读内容,目的是在您开始阅读本书之前提供一些指导。

本书的 "生态系统

Python 是一种流行的开放源代码编程语言,可用于各种领域的单机程序和脚本应用程序。它免费、可移植、功能强大,使用起来既相对简单又非常有趣。软件行业各个领域的程序员都发现,Python 注重开发人员的工作效率和软件质量,这在大大小小的项目中都是一种战略优势。

无论你是编程新手还是专业开发人员,本书都能让你快速掌握 Python 语言,而这些都是局限性较强的方法所无法实现的。读完本书后,你应该对 Python 有足够的了解,无论你选择探索哪个应用领域,都可以应用 Python。

从设计上讲,本书是一本强调Python 核心语言本身而非其具体应用的教程。因此,本书将作为两卷本中的第一卷:

  • 学习 Python》这本书,教授 Python 本身,重点是跨领域的语言基础知识。

  • 除其他外,《Python 编程》还继续展示了学习 Python 之后能做什么。

这种分工是经过深思熟虑的。虽然每个读者的应用目标会有所不同,但对有用的语言基础知识的需求却不会因此而改变。 以应用为重点的书籍,如《Python 编程》,会接续本书的内容,使用符合实际规模的示例来探讨 Python 在 Web、GUI、系统、数据库和文本等常见领域中的作用。此外,《Python Pocket Reference》一书提供了本书未包含的参考资料,旨在对本书进行补充。

不过,由于本书侧重于基础,因此能够比许多程序员在初学 Python 语言时看到的更有深度地介绍 Python 语言基础知识。其自下而上的方法和自成一体的示例旨在一步一步地向读者传授整门语言。

您在学习过程中获得的核心语言技能将适用于您遇到的所有 Python 软件系统--无论是 Django、NumPy 和 App Engine 等当今流行的工具,还是其他可能成为 Python 未来和您编程生涯一部分的工具。

由于本书基于为期三天的 Python 培训课程,并在整个课程中配有测验和练习,因此本书也可以作为一门自定进度的语言入门书。虽然本书的形式缺乏课堂上的现场互动,但它的额外深度和灵活性是一本书所能提供的。虽然本书有多种使用方法,但线性读者会发现它大致相当于一学期的 Python 课程。

关于第五版

本书之前的第四版于 2009 年出版,涵盖 Python 2.6 和 3.0 版本。1它从总体上解决了 Python 3.X 系列中引入的许多有时是不兼容的变化。它还引入了新的 OOP 教程,以及关于 Unicode 文本、装饰器和元类等高级主题的新章节,这些内容都来自于我的现场授课和 Python "最佳实践 "的演变。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

学习 Java,第 6 版

学习 Java,第 6 版

Marc Loy, Patrick Niemeyer, Daniel Leuck
《高性能 Python》第二版

《高性能 Python》第二版

Micha Gorelick, Ian Ozsvald

Publisher Resources

ISBN: 9798341656963