ExpertPythonProgramming,2ndEdition
精通Python编程第二版,英文文字版,能进一步学习Python编程CreditsAuthorsProofreaderMichal jaworskiSafis EditingTarek ziadeIndexerReviewerRekha nairFacundo batistaGraphicsCommissioning editorJason monteiroKunal parikhProduction CoordinatorAcquisition EditorAparna BhagatMeeta RajalCover workTechnical editorAparna BhagatPank可 i KadamCopy editLaxmi subramanianAbout the authorsMichai Jaworski has 7 years of experience in Python. He is also the creator ofgraceful, which is a REST framework built on top of falcon. He has been in variousroles at different companies: from an ordinary full-stack developer through softwarearchitect to VP of engineering in a fast-paced start-up company. Ile is currently alead backend engineer in TV Store team at Opera Software. He is highly experiencedin designing high-performance distributed services. He is also an active contributorto some of the popular python open source projectsTarek Ziade is an engineering manager at Mozilla, working with a teamspecialized in building web services in Python at scale for Firefox. He's contributedto the python packaging effort and has worked with a lot of different python webframeworks since Zope in the early daysTarek has also created Afp, the french python User group, and has written twobooks on Python in french. He has delivered numerous talks and tutorials in Frenchat international events such as Solutions Linux, Py Con, OSCON, and EuroPy thonAbout the reviewerFacundo batista is a specialist in the Python programming language, with morethan 15 years of experience with it. He is a core developer of the language, and amember by merit of the python Software Foundation He also received the 2009Community Service Award for organizing Py Con Argentina and the ArgentinianPython community as well as contributions to the standard library and work intranslating the Python documentationHe delivers talks in the main python conferences in argentina and other countries( The United States and Europe). In general, he has strong distributed collaborativeexperience from being involved in FLOSS development and working with peoplearound the globe for more than 10 yearsHe worked as a telecommunication engineer at Telefonica Moviles and Ericsson, andas a Python expert at Cyclelogic (developer in chief) and Canonical(senior softwaredeveloper, his current position)He also loves playing tennis, and is a father of two wonderful childrenWww.Packtpub.comeBooks, discount offers and moreDid you know that Packt offers e Book versions of every book published, with PDFandepuBfilesavailableYoucanupgradetotheebookversionatwww.packtpub.Comand as a print book customer, you are entitled to a discount on the e book copy. Get intouch with us at customercare@packtpub com for more detailsAtwww.packtpub.comyoucanalsoreadacollectionoffreetechnicalarticlessignup for a range of free newsletters and receive exclusive discounts and offers onPackt books and eBooksPACKTLIBhttps://www2.packtpub.ccm/books/subscription/packtlibDo you need instant solutions to your It questions? PacktLib is Packt's online digitalbook library. Here, you can search, access, and read Packt's entire library of booksWhy subscribe?Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browserTable of contentsPrefaceChapter 1: Current Status of PythonWhere are we now and where we are going?Why and how does Python change?Getting up to date with changes- PEP documentsPython 3 adoption at the time of writing this bookThe main differences between python 3 and python 2Why should I care?The main syntax differences and common pitfallsx1223455567Syntax changesChanges in the standard libraryChanges in datatypes and collectionsThe popular tools and techniques used for maintaining cross-versioncompatibilityNot only CPython12Why should I care?13Stackless Python13Jython14IronPython14PyPy15Modern approaches to Python development16Application-level isolation of Python environmentsy isolation19Popular solutions21virtualebuildoutWhich one to choose24Table of contentsSystem-level environment isolation25Virtual development environments using Vagrant26Containerization versus virtualization27Popular productivity tools28Custom Python shells-IPython, bpython, ptpython, and so on29Setting up the py thons tart uP environment variableIPythonbpythonpython31Interactive debuggers31Useful resources32Summary33Chapter 2: Syntax Best Practices- below the Class Level35Python 's built-in types36Strings and bytes36Implementation detailsString concatenation9Collections40Lists and tuples40DictionariesSetsBeyond basic collections-the collections module50Advanced syntax51Iterators51The yield statement52Decorators56General syntax and possible implementations57Usage and useful examples61Context managers the with statement68General syntax and possible implementations69Other syntax elements you may not know yet72The for else statementFunction annotationsThe general syntax74The possible uses74Summary75Chapter 3: Syntax Best Practices -above the Class LevelSubclassing built-in types78Accessing methods from superclasses80Old-style classes and super in Python 282Understanding python 's method resolution order83Table of Contentssuper pitTa87Mixing super and explicit class calls87Heterogeneous argumentsBest practices90Advanced attribute access patterns91Descriptors92Real-life example - lazily evaluated attributesProperties98Slots101Metaprogramming102Decorators-a method of metaprogramming103Class decorators103Using the new o method to override instance creation process105Metaclasses108The general syntax109New Python 3 syntax for metaclassesMetaclass usage115Metaclass pitfallsSome tips on code generation116exec, eval, and compile117Abstract Syntax Tree118Projects using code generation patterns120Summary123Chapter 4: Choosing Good Names125PEP 8 and naming best practices125Why and when to follow PEP 8?126Beyond PEP 8-team-specific style guidelines126Naming styles127Variables127Constants128aming and usage129Public and private variables130Functions and methods131The private controversy132Sp134Arguments134Properties134Classes135Modules and packages135The naming guide136Using the has or is prefix for boolean elements136Using plurals for variables that are collections136Using explicit names for dictionaries136
下载地址
用户评论
The file is damaged and cannot be opened