The python ecosystem is awash with books for beginners but after that, what next? The book aims to bridge the gap between beginning level python and intermediate level python.

This book dives into topics such as python object system, functions, decorators, metaprogramming and generators providing the reader with an in-depth knowledge of these topics that is essential for writing idiomatic and robust python code. It aims to provide a reader with not only a how to but also a why about python concepts.

If you are looking for a book to take you beyond the beginner level in python, this is definitely the right book for you.

Obi Ike-Nwosu

  • 1. Introduction
  • 2. A Short Tutorial

    • 2.1 Installing Python
    • 2.2 Using Python
      • Invoking the Python Interpreter
    • 2.3 Python Statements, Line Structure and Indentation
    • 2.4 Strings
    • 2.5 Flow Control

      • if-else and if-elif-else statements
      • for and range statements

      • while statement

      • break and continue statements

      • Enumerate

    • 2.6 Functions
    • 2.7 Data Structures
    • 2.8 Classes
    • 2.9 Modules
    • 2.10 Exceptions
    • 2.11 Input and Output
    • 2.12 Getting Help
  • 3. Intermezzo: A Little Python History
    • 3.1 The Evolution of Python
    • 3.2 Python 2 vs Python 3
    • 3.3 The Python Programming Langauge
  • 4. Python Object Types

    • 4.1 Object Basics
    • 4.2 The Type Hierarchy

      • None
      • NotImplemented:
      • Ellipsis
      • Numeric Types
      • Sequences

      • Set

      • Mapping

      • Callable Types

      • Custom Types

      • Modules:

      • File/IO Types

      • Built-in Types:

  • 5. Intermezzo: Glosssary
    • 5.1 Names and Binding
    • 5.2 Code Blocks
    • 5.3 Namespaces
    • 5.4 Scopes
    • 5.5 Eval()
    • 5.6 Exec()
  • 6. Classes and Object Oriented Programming

    • 6.1 The Mechanics of Class Definitions

      • Class Objects

      • Instance Objects

      • Method Objects

    • 6.2 Customizing User-defined Classes * Special Methods for comparing objects

      • Special Methods for Miscellaneous Customizations
    • 6.3 Inheritance * The super keyword

      • Multiple Inheritance
    • 6.4 Abstract Base Classes
    • 6.5 Descriptors and Properties * Python Descriptors

      • Class Properties
    • 6.6 Static and Class Methods * Static Methods

      • Class Methods
  • 7. The Function

    • 7.1 Function Definitions
    • 7.2 Functions are Objects
    • 7.3 Function Call Arguments

      • Unpacking Function Argument

      • * and ** Function Arguments

    • 7.4 Nested functions and Closures
    • 7.5 A Byte of Functional Programming

      • The Basics

      • Comprehensions

      • List Comprehensions

      • Nested for loops in List Comprehensions

      • Nested List Comprehensions

      • Set Comprehensions

      • Dict Comprehensions

      • Functools

      • Sequences

  • 8. Sequences and Generators

    • 8.1 Python Iterators
    • 8.2 The Itertools Module
    • 8.3 Generators

      • The yield keyword

      • Passing values into a generator

      • Python Generators In Action

      • Generator Expressions

      • Of what use are these generators?

  • 9. MetaProgramming

    • 9.1 Decorators

      • Function Decorators

      • Python Decorators

      • Passing Arguments For Decorated Functions

      • Decorator Functions with Arguments

      • **_Functools.wrap_**

      • Class Decorators
    • 9.2 Decorator Recipes
    • 9.3 Metaclasses
      • Metaclasses in Action
    • 9.4 Context Managers
  • 10. Modules And Packages

    • 10.1 Modules
      • Reloading Modules
    • 10.2 Where do my Modules come from?
    • 10.3 Packaging things Up
    • 10.4 The Import System

      • The Import Search Process

      • Why You Probably Should Not Reload Modules…

    • 10.5 Distributing Python Programs
  • 11. Inspecting Objects
    • 11.1 Handling source code
    • 11.2 Inspecting Classes and Functions
    • 11.3 Interacting with Interpreter Stacks
  • 12. Rounding Up …