Course: Advanced Python

Course participant looking at slide summarising the course content

Duration: 4 days

Pre-requisites

Prerequisites:

  • Used to creating and running Python scripts
  • Comfortable using Python’s
    • Basic data types (int, float, str, dict, list)
    • Flow control (for and while loops)
    • Functions (calling and creating)
  • And some familiarity with creating and using Python’s objects and classes

In short, it is a follow-on course from the Beginner’s Python course

Course contents

Object oriented programming

  • Classes, instances, constructors, attributes and methods
  • Python’s object model, special methods and protocols
  • Properties, slots, abstract classes
  • Inheritance and composition, polymorphism
  • Meta programming

Design patterns

  • Iterator design pattern, iter() and next(), generators, generator expressions, generator functions, classes as iterators
  • Decorator design pattern, functions as first class objects, monkey patching, enclosures, variadic function parameters, decorator factories, decorating a class
  • Proxy pattern, lazy loading
  • Factory pattern
  • Template pattern
  • Observer pattern

Automated testing

  • Python’s unit test library, pytest
  • Test coverage, mocking
  • Test driven development (TDD)
  • Testing with date and time

Logging, debugging and exceptions

  • Simple to advanced logging, logging handlers, configuration
  • Debugging tools and tips
  • Raising and handling exceptions

Maintainable code

  • Coding standards, type hints, refactoring and linting
  • Documentation
  • Reproducible coding environments

Code re-use

  • Importing, standard library, Python Package Index (PyPI)
  • Packaging your code, submitting a package to PyPI

Optimising

  • Optimising steps
  • Timing and profiling
  • Optimising for CPU usage and for memory usage
  • Threads versus processes
  • Multi threading and multi processing
  • Producer-consumer pattern
  • Thread and process pools
  • Asynchronous programming

Optional, time permitting

  • Functional Programming and Python

You may also like...