Expert Python Programming(Second Edition)
上QQ阅读APP看书,第一时间看更新

What this book covers

Chapter 1, Current Status of Python, showcases the current state of the Python language and its community. It shows how Python is constantly changing, why it is changing, and also why these facts are important for anyone who wants to call themselves a Python professional. This chapter also features the most popular and canonical ways of working in Python—popular productivity tools and conventions that are de facto standards now.

Chapter 2, Syntax Best Practices – below the Class Level, presents iterators, generators, descriptors, and so on, in an advanced way. It also covers useful notes about Python idioms and internal CPython types implementations with their computational complexities as a rationale for showcased idioms.

Chapter 3, Syntax Best Practices – above the Class Level, explains syntax best practices, but focuses above the class level. It covers more advanced object-oriented concepts and mechanisms available in Python. This knowledge is required in order to understand the last section of the chapter, which presents different approaches to metaprogramming in Python.

Chapter 4, Choosing Good Names, involves choosing good names. It is an extension to PEP 8 with naming best practices, but also gives tips on designing good APIs.

Chapter 5, Writing a Package, explains how to create the Python package and which tools to use in order to properly distribute it on the official Python Package Index or any other package repository. Information about packages is supplemented with a brief review of the tools that allow you to create standalone executables from Python sources.

Chapter 6, Deploying Code, aims mostly at Python web developers and backend engineers, because it deals with code deployments. It explains how Python applications should be built in order to be easily deployed to remote servers and what tools you can use in order to automate that process. This chapter dovetails with Chapter 5, Writing a Package, because it shows how packages and private package repositories can be used to streamline your application deployments.

Chapter 7, Python Extensions in Other Languages, explains why writing C extensions for Python might be a good solution sometimes. It also shows that it is not as hard as it seems to be as long as the proper tools are used.

Chapter 8, Managing Code, gives some insight into how a project code base can be managed and explains how to set up various continuous development processes.

Chapter 9, Documenting Your Project, covers documentation and provides tips on technical writing and how Python projects should be documented.

Chapter 10, Test-Driven Development, explains the basic principles of test-driven development and the tools that can be used in this development methodology.

Chapter 11, Optimization – General Principles and Profiling Techniques, explains optimization. It provides profiling techniques and an optimization strategy guideline.

Chapter 12, Optimization – Some Powerful Techniques, extends Chapter 11, Optimization – General Principles and Profiling Techniques, by providing some common solutions to the performance problems that are often found in Python programs.

Chapter 13, Concurrency, introduces the vast topic of concurrency in Python. It explains what concurrency is, when it might be necessary to write concurrent applications, and what are the main approaches to concurrency for Python programmers.

Chapter 14, Useful Design Patterns, concludes the book with a set of useful design patterns and example implementations in Python.