《Fluent Python, 2nd Edition》简介:
Python’s simplicity lets you become productive quickly, but often this means you aren’t using everything it has to offer. With the updated edition of this hands-on guide, you’ll learn how to write effective, modern Python 3 code by leveraging its best ideas.
Don’t waste time bending Python to fit patterns you learned in other languages. Discover and apply idiomatic Python 3 features beyond your past experience. Author Luciano Ramalho guides you through Python’s core language features and libraries and teaches you how to make your code shorter, faster, and more readable.
Featuring major updates throughout the book, Fluent Python, second edition, covers:
Special methods: The key to the consistent behavior of Python objects
Data structures: Sequences, dicts, sets, Unicode, and data classes
Functions as objects: First-class functions, related design patterns, and type hints in function declarations
Object-oriented idioms: Composition, inheritance, mixins, interfaces, operator overloading, static typing and protocols
Control flow: Context managers, generators, coroutines, async/await, and thread/process pools
Metaprogramming: Properties, attribute descriptors, class decorators, and new class metaprogramming hooks that are simpler than metaclasses
《Fluent Python, 2nd Edition》摘录:
加州大学两位教授(Brian Harvey 和Matthew Wright)的课件 -- 两种计算机科学的教学观点: 保守观点 计算机程序在人类的思维中会变得非常庞大和复杂。因此,计算机科学教育的目的是教会人们如何训练它们的编程能力,比如以这种方式--让500个平庸的程序员聚集在一起,给出规格让他们生产出一个程序。 激进观点 计算机程序在人类的思维中会变得非常庞大和复杂。因此,计算机科学教育的目的是教会人们如何扩展自己的思维以和程序契合,学习更多的概念,将会比单一解决方法更加弹性和有用。一个程序每个单元的编程的想法都必须统观全局。