Fluent Python

Luciano Ramalho

出版时间

2015-08-20

ISBN

9781491946008

评分

★★★★★
书籍介绍
这本书不教你怎么写能跑的Python,而是教你怎么写才算'地道'的Python。它直面一个普遍陷阱:带着其他语言的惯性用Python,结果处处是'翻译腔'——把轮子重新发明一遍。作者把Python的数据模型、协议、魔法方法等底层机制拆解开,告诉你'与类型无关、只要实现相应协议'这类思想如何让代码更简洁、更快、更易读。读者反馈显示,它适合已掌握基础、想突破'能运行'瓶颈的进阶者;篇幅近800页却因作者文笔流畅而'读起来过瘾'。它不是速查手册,而是一场重塑Python思维方式的学习——代价是coroutine、GIL、asyncio等主题仍需你自己抠细节。
作者简介
Luciano Ramalho was a Web developer before the Netscape IPO in 1995, and switched from Perl to Java to Python in 1998. Since then he worked on some of the largest news portals in Brazil using Python, and taught Python web development in the Brazilian media, banking and government sectors. His speaking credentials include PyCon US (2013), OSCON (2002, 2013), and 15 talks over the years at PythonBrasil (the Brazilian PyCon) and FISL (the largest FLOSS conference in the Southern Hemisphere). Ramalho is a member of the Python Software Foundation and co-founder of Garoa Hacker Clube, the first hackerspace in Brazil. He is co-owner of Python.pro.br, atraining company.
AI导读
核心看点
  • 深入解析Python数据模型,掌握魔术方法
  • 摒弃其他语言思维,写出地道Pythonic代码
  • 详解元编程、协程等高级特性与底层原理
读者共识
  • 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."
用户评论
内容很多,然而我并没有耐心仔细看
good enough
难得的互补官方文档的语言书
大开眼界
深度广度俱佳,举例与理论契合,补充材料丰富,文字通畅,读起来十分过瘾。唯一有点不喜欢的地方是 coroutine、GIL、asyncio 有很多小细节需要自己去抠,书里没法面面俱到。不过这三个主题本身就很鸡毛,能引人入门就很不错了~
中文版看不明白的时候对照着原版看看。
作者试着从一个更深入的角度来讲解python的设计哲学,引用了若干历史上做决定的过程(比如maillist或者PEPlink),可以帮助读者了解深入的背景。书的有些部分写的有点过于自嗨?,如果在有些地方能够和其他语言来比较一下,讲清楚python当前设计思想下可能存在的问题,就更好了 -
读得差不多了,直接坐等第二版。
读过关于python最好的书, 非常透彻, 这本书才让我感觉有一些了解python了
难懂得要死
下载
收藏