Expert Python Programming - Second Edition

Become an ace Python programmer by learning best coding practices and advance-level concepts with Python 3.5

Expert Python Programming - Second Edition

This ebook is included in a Mapt subscription
Michał Jaworski, Tarek Ziadé

7 customer reviews
Become an ace Python programmer by learning best coding practices and advance-level concepts with Python 3.5
$0.00
$30.60
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785886850
Paperback536 pages

Book Description

Python is a dynamic programming language, used in a wide range of domains by programmers who find it simple, yet powerful. Even if you find writing Python code easy, writing code that is efficient and easy to maintain and reuse is a challenge.

The focus of the book is to familiarize you with common conventions, best practices, useful tools and standards used by python professionals on a daily basis when working with code.

You will begin with knowing new features in Python 3.5 and quick tricks for improving productivity. Next, you will learn advanced and useful python syntax elements brought to this new version. Using advanced object-oriented concepts and mechanisms available in python, you will learn different approaches to implement metaprogramming. You will learn to choose good names, write packages, and create standalone executables easily.

You will also be using some powerful tools such as buildout and vitualenv to release and deploy the code on remote servers for production use. Moving on, you will learn to effectively create Python extensions with C, C++, cython, and pyrex. The important factors while writing code such as code management tools, writing clear documentation, and test-driven development are also covered.

You will now dive deeper to make your code efficient with general rules of optimization, strategies for finding bottlenecks, and selected tools for application optimization.

By the end of the book, you will be an expert in writing efficient and maintainable code.

Table of Contents

Chapter 1: Current Status of Python
Where are we now and where we are going?
Why and how does Python change?
Getting up to date with changes – PEP documents
Python 3 adoption at the time of writing this book
The main differences between Python 3 and Python 2
Not only CPython
Modern approaches to Python development
Application-level isolation of Python environments
System-level environment isolation
Popular productivity tools
Useful resources
Summary
Chapter 2: Syntax Best Practices – below the Class Level
Python's built-in types
Advanced syntax
Other syntax elements you may not know yet
Summary
Chapter 3: Syntax Best Practices – above the Class Level
Subclassing built-in types
Accessing methods from superclasses
Advanced attribute access patterns
Metaprogramming
Summary
Chapter 4: Choosing Good Names
PEP 8 and naming best practices
Naming styles
The naming guide
Best practices for arguments
Class names
Module and package names
Useful tools
Summary
Chapter 5: Writing a Package
Creating a package
Namespace packages
Uploading a package
Standalone executables
Summary
Chapter 6: Deploying Code
The Twelve-Factor App
Deployment automation using Fabric
Your own package index or index mirror
Common conventions and practices
Code instrumentation and monitoring
Summary
Chapter 7: Python Extensions in Other Languages
Different language means – C or C++
Why you might want to use extensions
Writing extensions
Challenges
Interfacing with dynamic libraries without extensions
Summary
Chapter 8: Managing Code
Version control systems
Continuous development processes
Summary
Chapter 9: Documenting Your Project
The seven rules of technical writing
A reStructuredText primer
Building the documentation
Making your own portfolio
Summary
Chapter 10: Test-Driven Development
I don't test
I do test
Summary
Chapter 11: Optimization – General Principles and Profiling Techniques
The three rules of optimization
Optimization strategy
Finding bottlenecks
Summary
Chapter 12: Optimization – Some Powerful Techniques
Reducing the complexity
Simplifying
Using collections
Using architectural trade-offs
Caching
Summary
Chapter 13: Concurrency
Why concurrency?
Multithreading
Multiprocessing
Asynchronous programming
Summary
Chapter 14: Useful Design Patterns
Creational patterns
Structural patterns
Behavioral patterns
Summary

What You Will Learn

  • Conventions and best practices that are widely adopted in the python community
  • Package python code effectively for community and production use
  • Easy and lightweight ways to automate code deployment on remote systems
  • Improve your code’s quality, reliability, and performance
  • Write concurrent code in python
  • Extend python with code written in different languages

Authors

Table of Contents

Chapter 1: Current Status of Python
Where are we now and where we are going?
Why and how does Python change?
Getting up to date with changes – PEP documents
Python 3 adoption at the time of writing this book
The main differences between Python 3 and Python 2
Not only CPython
Modern approaches to Python development
Application-level isolation of Python environments
System-level environment isolation
Popular productivity tools
Useful resources
Summary
Chapter 2: Syntax Best Practices – below the Class Level
Python's built-in types
Advanced syntax
Other syntax elements you may not know yet
Summary
Chapter 3: Syntax Best Practices – above the Class Level
Subclassing built-in types
Accessing methods from superclasses
Advanced attribute access patterns
Metaprogramming
Summary
Chapter 4: Choosing Good Names
PEP 8 and naming best practices
Naming styles
The naming guide
Best practices for arguments
Class names
Module and package names
Useful tools
Summary
Chapter 5: Writing a Package
Creating a package
Namespace packages
Uploading a package
Standalone executables
Summary
Chapter 6: Deploying Code
The Twelve-Factor App
Deployment automation using Fabric
Your own package index or index mirror
Common conventions and practices
Code instrumentation and monitoring
Summary
Chapter 7: Python Extensions in Other Languages
Different language means – C or C++
Why you might want to use extensions
Writing extensions
Challenges
Interfacing with dynamic libraries without extensions
Summary
Chapter 8: Managing Code
Version control systems
Continuous development processes
Summary
Chapter 9: Documenting Your Project
The seven rules of technical writing
A reStructuredText primer
Building the documentation
Making your own portfolio
Summary
Chapter 10: Test-Driven Development
I don't test
I do test
Summary
Chapter 11: Optimization – General Principles and Profiling Techniques
The three rules of optimization
Optimization strategy
Finding bottlenecks
Summary
Chapter 12: Optimization – Some Powerful Techniques
Reducing the complexity
Simplifying
Using collections
Using architectural trade-offs
Caching
Summary
Chapter 13: Concurrency
Why concurrency?
Multithreading
Multiprocessing
Asynchronous programming
Summary
Chapter 14: Useful Design Patterns
Creational patterns
Structural patterns
Behavioral patterns
Summary

Book Details

ISBN 139781785886850
Paperback536 pages
Read More
From 7 reviews

Read More Reviews