流畅的Python (第2版)

[巴西] Luciano Ramalho

出版时间

2023-03-31

ISBN

9787115612366

评分

★★★★★
书籍介绍
本书是 Python 领域备受推崇的经典作品,致力于帮助 Python 开发人员挖掘这门语言及相关程序库的优秀特性,写出简洁、流畅、易读、易维护,并且地道的 Python 代码。本书着重讲解 Python 语言所独有的功能,助你成功进阶为 Python 高手。 第二版与时俱进,教你跳出旧有经验,探索并运用地道的 Python 3 功能。主体内容分为五部分:数据结构、函数即对象、类和协议、控制流、元编程。每一部分都精彩纷呈,通过丰富的示例和细致的讲解,教你充分利用 Python 特性,写出有效且现代的 Python 3 代码。
AI导读
核心看点
  • 深入解析Python数据模型与底层机制
  • 涵盖Python 3新特性及元编程技巧
  • 通过实例讲解写出地道Python代码
适合谁读
  • 有基础想进阶的Python开发者
  • 希望写出简洁易维护代码的程序员
  • 对Python语言设计原理感兴趣的读者
读前提醒
  • 中文版翻译质量争议大,建议读原版
  • 内容较深,适合有一定编程经验者
  • 可结合官方文档辅助理解晦涩概念
读者共识
  • 内容极佳,是Python进阶必读经典
  • 译文质量堪忧,严重影响阅读体验
  • 讲解透彻,能显著提升代码编写水平

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • "加州大学两位教授(Brian Harvey 和Matthew Wright)的课件 -- 两种计算机科学的教学观点: 保守观点 计算机程序在人类的思维中会变得非常庞大和复杂。因此,计算机科学教育的目的是教会人们如何训练它们的编程能力,比如以这种方式--让500个平庸的程序员聚集在一起,给出规格让他们生产出一个程序。 激进观点 计算机程序在人类的思维中会变得非常庞大和复杂。因此,计算机科学教育的目的是教会人们如何扩展自己的思维以和程序契合,学习更多的概念,将会比单一解决方法更加弹性和有用。一个程序每个单元的编程的想法都必须统观全局。"
  • "发送时要保守,接收时要大方。 ——伯斯塔尔定律,又称稳健性法则"
  • "Strong versus weak typing If the language rarely performs implicit conversion of types, it’s considered strongly typed; if it often does it, it’s weakly typed. Java, C++, and Python are strongly typed. PHP, JavaScript, and Perl are weakly typed. Static versus dynamic typing If type-checking is perfo"
  • "If a class is designed to provide method implementations for reuse by multiple unrelated subclasses, without implying an “is-a” relationship, it should be an explicit mixin class. Conceptually, a mixin does not define a new type; it merely bundles methods for reuse. A mixin should never be instantia"
  • "The second edition of Python Cookbook was written for Python 2.4, but much of its code works with Python 3, and a lot of the recipes in Chapters 5 and 6 deal with sequences. The book was edited by Alex Martelli, Anna Martelli Ravenscroft, and David Ascher, and it includes contributions by dozens of "
  • "Operating with objects regardless of their types, as long as they implement certain protocols"
  • "Changing a class or module at runtime, without touching the source code"
  • "You can think of the data model as a description of Python as a framework."
作者简介
Luciano Ramalho,Thoughtworks 首席咨询师、Python 软件基金会成员、巴西知名 Python 语言学习社区 Python Brasil 联合创始人。拥有25年 Python 编程经验,著有《流畅的Python》。
用户评论
神书,阅读越上头的编程书~
下载
收藏