內容簡介
Python的簡潔讓你可以快速達到高産水平,但是這通常意味著你並沒有用到它提供的所有功能特性。
有瞭《流利的Python語言(影印版 英文版)》,你將學會如何利用那些很容易被忽視的特性來編寫有效且通順的Python代碼。作者Luciano Ramalho將帶領你們遍曆Python的核心語言特性和程序庫,並展示精簡代碼、優化速度和可讀性的方法。
很多富有經驗的程序員嘗試將Python扭麯成適閤他們從其他語言中學到的模式,而從未發現超齣他們經驗的Python特性。通過《流利的Python語言(影印版 英文版)》,那些Python程序員將完全學會如何高效率地使用Python 3。
目錄
Preface
Part I. Prologue
1. The Python Data Model
A Pythonic Card Deck
How Special Methods Are Used
Emulating Numeric Types
String Representation
Arithmetic Operators
Boolean Value of a Custom Type
Overview of Special Methods
Why len Is Not a Method
Chapter Summary
Further Reading
Part II. Data Structures
2. An Array of Sequences
Overview of Built-In Sequences
List Comprehensions and Generator Expressions
List Comprehensions and Readability
Listcomps Versus map and filter
Cartesian Products
Generator Expressions
Tuples Are Not Just Immutable Lists
Tuples as Records
Tuple Unpacking
Nested Tuple Unpacking
Named Tuples
Tuples as Immutable Lists
Slicing
Why Slices and Range Exclude the Last Item
Slice Objects
Multidimensional Slicing and Ellipsis
Assigning to Slices
Using + and * with Sequences
Building Lists of Lists
Augmented Assignment with Sequences
A += Assignment Puzzler
list.sort and the sorted Built-In Function
Managing Ordered Sequences with bisect
Searching with bisect
Inserting with bisect.insort
When a List Is Not the Answer
Arrays
Memory Views
NumPy and SciPy
Deques and Other Queues
Chapter Summary
Further Reading
3. Dictionaries and Sets
Generic Mapping Types
dict Comprehensions
Overview of Common Mapping Methods
Handling Missing Keys with setdefault
Mappings with Flexible Key Lookup
defaultdict: Another Take on Missing Keys
The___ missing___ Method
Variations of dict
Subclassing UserDict
Immutable Mappings
Set Theory
set Literals
Set Comprehensions
Set Operations
dict and set Under the Hood
A Performance Experiment
Hash Tables in Dictionaries
……
Part III. Functions as Objects
Part IV. Object-Orientedldioms
Part V. Control Flow
Part VI. Metaprogramming
Afterword
A. Support Scripts
Python Jargon
Index
精彩書摘
《流利的Python語言(影印版 英文版)》:
In concluding the chapter, we mentioned how several built—in types are registered to ABCs in the collections.abe module so you can ask isinstance(memoryview,abc.Sequence) and get True, even if memoryview does not inherit from abc.Se quence.And finally we went over the_subclasshook_magic, which lets an ABC recognize any unregistered class as a subclass, as long as it passes a test that can be as simple or as complex as you like—the examples in the standard library merely check for method names.
To sum up, I'd like to restate Alex Martelli's admonition that we should refrain from creating our own ABCs, except when we are building user—extensible frameworks—which most of the time we are not.On a daily basis, our contact with ABCs should be subclassing or registering classes with existing ABCs.Less often than subclassing or registering, we might use ABCs for isinstance checks.And even more rarely—ifever—we find occasion to write a new ABC from scratch.
……
流利的Python語言(影印版 英文版) [Fluent Python] 下載 mobi epub pdf txt 電子書 格式
評分
☆☆☆☆☆
Python數據分析基礎(影印版 英文版)Python數據分析基礎(影印版 英文版)Python數據分析基礎(影印版 英文版)Python數據分析基礎(影印版 英文版)Python數據分析基礎(影印版 英文版)Python數據分析基礎(影印版 英文版)Python數據分析基礎(影印版 英文版)Python數據分析基礎(影印版 英文版)Python數據分析基礎(影印版 英文版)Python數據分析基礎(影印版 英文版)Python數據分析基礎(影印版 英文版)
評分
☆☆☆☆☆
書本身是不錯,但跟sklearn掛在網上的官方文檔,好像也沒多大區彆。
評分
☆☆☆☆☆
書怎麼樣還沒看,不過現在書的紙張確實不如原來好瞭,另外這書遠沒有圖片上看起來厚實,比較薄的一本,這麼說來書漲價瞭啊
評分
☆☆☆☆☆
主要講瞭通過skikit這個python庫來講解機器學習
評分
☆☆☆☆☆
非常經典,推薦一下,就是需要啃英文的
評分
☆☆☆☆☆
挺好,機器學習的書,側重實踐,教大傢如何用scikit-learn裏機器學習的各種算法實現數據分析。
評分
☆☆☆☆☆
目前讀的最好的一本python書籍,不吹
評分
☆☆☆☆☆
通俗易懂,書的印刷質量不錯!
評分
☆☆☆☆☆
書的質量很好,介紹瞭常用的算法及其實現