Effective Python:编写高质量Python代码的59个有效方法(英文版)

Effective Python:编写高质量Python代码的59个有效方法(英文版)
作 者: Brett Slatkin
出版社: 电子工业出版社
丛编项:
版权说明: 本书为公共版权或经版权方授权,请支持正版图书
标 签: 程序设计 计算机/网络
ISBN 出版时间 包装 开本 页数 字数
未知 暂无 暂无 未知 0 暂无

作者简介

  (美)Brett Slatkin(布雷特·斯拉特金)

内容简介

本书不是要讲述 Python 的基础编程,而是要帮你掌握 Python 独特的优势和魅力。书中总结了 59个 Python 编程的优秀实践、贴士和捷径,并用真实代码示例进行了解释。全书共分 8 章,第 1 章讲述Python 的风格思想,介绍了 Python 中常见问题的推荐解决方案;第 2 章讲述如何使用 Python 函数来阐明意图、提升可重用性,并减少错误;第 3 章介绍如何使用类和继承来表达你对对象的预期行为;第4章介绍了使用这些元类和属性的常用语法;第5章讲述如何在并行和并发的场景下利用好Python;第 6 章讲述 Python 中必要的内置模块;第 7 章教你如何合作开发 Python 程序;第 8 章介绍如何使用Python 调试、优化和测试程序。

图书目录

前言 致谢 关于作者 Chapter 1: Pythonic Thinking Item 1: Know Which Version of Python You’re Using Item 2: Follow the PEP 8 Style Guide Item 3: Know the Differences Between bytes , str , and unicode Item 4: Write Helper Functions Instead of Complex Expressions ...

except

else

finally Chapter 2: Functions Item 14: Prefer Exceptions to Returning None Item 15: Know How Closures Interact with Variable Scope Item 16: Consider Generators Instead of Returning Lists Item 17: Be Defensive When Iterating Over Arguments Item 18: Reduc...

finally Behavior Item 44: Make pickle Reliable with copyreg Item 45: Use datetime Instead of time for Local Clocks Item 46: Use Built-in Algorithms and Data Structures Item 47: Use decimal When Precision Is Paramount Item 48: Know Where to Find Communi...