点击选择搜索分类
首页 - 社会科学- 正文
☆☆☆☆☆
||
Luciano,Ramalho 著
出版社: 东南大学出版社 ISBN:9787564168742 版次:1 商品编码:12109424 包装:平装 外文名称:Fluent Python 开本:16开 出版时间:2017-01-01 用纸:胶版纸 页数:743 字数:945000 正文语种:英文
有了《流利的Python语言(影印版 英文版)》,你将学会如何利用那些很容易被忽视的特性来编写有效且通顺的Python代码。作者Luciano Ramalho将带领你们遍历Python的核心语言特性和程序库,并展示精简代码、优化速度和可读性的方法。
很多富有经验的程序员尝试将Python扭曲成适合他们从其他语言中学到的模式,而从未发现超出他们经验的Python特性。通过《流利的Python语言(影印版 英文版)》,那些Python程序员将完全学会如何高效率地使用Python 3。
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
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语言(影印版 英文版) [Fluent Python]-so88
流利的Python语言(影印版 英文版) [Fluent Python] pdf epub mobi txt 电子书 下载 2022
图书介绍
☆☆☆☆☆
||
Luciano,Ramalho 著
出版社: 东南大学出版社 ISBN:9787564168742 版次:1 商品编码:12109424 包装:平装 外文名称:Fluent Python 开本:16开 出版时间:2017-01-01 用纸:胶版纸 页数:743 字数:945000 正文语种:英文
内容简介
Python的简洁让你可以快速达到高产水平,但是这通常意味着你并没有用到它提供的所有功能特性。有了《流利的Python语言(影印版 英文版)》,你将学会如何利用那些很容易被忽视的特性来编写有效且通顺的Python代码。作者Luciano Ramalho将带领你们遍历Python的核心语言特性和程序库,并展示精简代码、优化速度和可读性的方法。
很多富有经验的程序员尝试将Python扭曲成适合他们从其他语言中学到的模式,而从未发现超出他们经验的Python特性。通过《流利的Python语言(影印版 英文版)》,那些Python程序员将完全学会如何高效率地使用Python 3。
目录
PrefacePart 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
电子书下载地址:
相关电子书推荐:
- 文件名
- 大脑赋能术
- 新党政机关公文与办公室写作
- 水文学(第五版)/普通高等教育土建学科专业“十二五”规划教材
- 正版 冷读术 瞬间抓住人心和操作人心的沟通技巧(白金珍藏版) 社交 人际关系 客户关系 励
- 地震灾害遥感综合评估与示范 张景发 等
- 风度杂志2018年2月封面王千源副刊胡 风度气质精神世界倡导品位生活方式与思想乐趣期刊
- {RT}寻访海洋生物-金翔龙 陆儒德 中译出版社(原中国对外翻译出版公司) 9787500
- 服饰搭配艺术/高等院校人物形象设计专业系列规划教材
- 十大物理学家 9787229123215 [英] 布莱恩·克莱格(Brian Clegg)
- 皮肤美容学(中国医师协会皮肤美容专业医师培训教材)
- 权五吉老师讲述的 神奇的昆虫故事
- 入门速成班丛书(3):粤语入门速成班(附MP3光盘1张)
- 让我们运动吧!-听爸爸讲科普-(低幼版)
- 怎样写文章(最新增订本)
- 爬行动物 牛立红著