没有合适的资源?快使用搜索试试~ 我知道了~
首页Pro Python 3, 3rd Edition (True PDF)
Pro Python 3, 3rd Edition (True PDF)
需积分: 10 106 浏览量
更新于2023-05-29
评论 1
收藏 5.94MB PDF 举报
Pro Python 3: Features and Tools for Professional Development, 3rd Edition (True PDF)
资源详情
资源评论
资源推荐

Pro Python 3
Features and Tools for Professional
Development
—
Third Edition
—
J. Burton Browning
Marty Alchin

Pro Python 3
Features and Tools for
Professional Development
Third Edition
J.BurtonBrowning
MartyAlchin

Pro Python 3: Features and Tools for Professional Development
ISBN-13 (pbk): 978-1-4842-4384-8 ISBN-13 (electronic): 978-1-4842-4385-5
https://doi.org/10.1007/978-1-4842-4385-5
Library of Congress Control Number: 2019936454
Copyright © 2019 by J. Burton Browning and Marty Alchin
is work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microlms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benet of the trademark owner, with no intention of infringement of the
trademark.
e use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identied as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. e publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Todd Green
Development Editor: James Markham
Coordinating Editor: Jill Balzano
Cover designed by eStudioCalamar
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media NewYork, 233 Spring Street,
6th Floor, NewYork, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-
sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member
(owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a
Delaware corporation.
For information on translations, please e-mail rights@apress.com, or visit http://www.apress.com/
rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub via the book’s product page, located at www.apress.com/9781484243848. For more
detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper
J.BurtonBrowning
Oak Island, NC, USA
MartyAlchin
Agoura Hills, CA, USA

is edition is dedicated to Champion Suyaki Mamma Mia of Misibo
and her sister Champion Sienna of Olympia of Misibo, two of the best
Siamese cats who ever owned me.

v
Chapter 1: Principles and Philosophy....................................................................... 1
The Zen of Python ������������������������������������������������������������������������������������������������������������������������� 2
Beautiful Is Better Than Ugly ��������������������������������������������������������������������������������������������������� 3
Explicit Is Better Than Implicit ������������������������������������������������������������������������������������������������� 4
Simple Is Better Than Complex ����������������������������������������������������������������������������������������������� 5
Complex Is Better Than Complicated ��������������������������������������������������������������������������������������� 6
Flat Is Better Than Nested ������������������������������������������������������������������������������������������������������� 6
Sparse Is Better Than Dense ��������������������������������������������������������������������������������������������������� 8
Readability Counts ������������������������������������������������������������������������������������������������������������������� 9
Special Cases Aren’t Special Enough to Break the Rules ������������������������������������������������������ 10
Practicality Beats Purity �������������������������������������������������������������������������������������������������������� 10
Errors Should Never Pass Silently ����������������������������������������������������������������������������������������� 11
Unless Explicitly Silenced ������������������������������������������������������������������������������������������������������ 14
In the Face of Ambiguity, Refuse the Temptation to Guess ���������������������������������������������������� 15
There Should Be One—and Preferably Only One—Obvious Way to Do It ����������������������������� 15
Although That Way May Not Be Obvious at First, Unless You’re Dutch ���������������������������������� 17
Now Is Better Than Never ������������������������������������������������������������������������������������������������������ 17
Although Never Is Often Better Than Right Now �������������������������������������������������������������������� 18
If the Implementation Is Hard to Explain, It’s a Bad Idea ������������������������������������������������������� 18
If the Implementation Is Easy to Explain, It May Be a Good Idea ������������������������������������������ 19
Namespaces Are One Honking Great Idea: Let’s Do More of Those! ������������������������������������� 19
Table of Contents
About the Authors ....................................................................................................xv
About the Technical Reviewer ...............................................................................xvii
Acknowledgments ..................................................................................................xix
Introduction ............................................................................................................xxi
剩余467页未读,继续阅读















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0