0345 4506120

Advanced Python (2 days)

Are you a keen Python developer ready to learn even more? Interested in diving into the complex world of advanced flow classes and abstract base classes? Then this course is for you!

This two day course is designed for developers who already have significant knowledge of Python. This course will delve into fascinating corners of Python, introducing students to details of Python's internals as well as deepening their understanding of familiar territory. The class will focus on Python 3, unless Python 2 is specifically requested.

Rather than working bottom-up, this course starts with analyzing and understanding working examples. This way developers will understand the various interdependent techniques in situ rather than in isolation.

About the Author

Robert Smallshire

Robert Smallshire

Robert Smallshire is a founding director of Sixty North, a software product and consulting business in Norway . Robert has worked in senior architecture and technical management roles for several software companies providing tools in the energy sector


Learning Objectives

Learn how to:

  • Advanced flow control
  • Byte-oriented programming
  • Object internals and custom attributes
  • Descriptors and slots
  • Metaclasses and class decorators
  • Abstract base classes
  • The numeric tower and conversions
  • Numeric operators in depth
  • Advanced collections
  • Coroutines and advanced generators
  • Understand the import system
  • Go from source code to execution
  • Publish to the Python Package Index

Course Content

Day 1 Low Level Python

  • Using else with for, while, and try
  • Dispatching call on argument type
  • Emulating switch statements in Python
  • bytearray, and bytes revisited
  • The memoryview and struct modules
  • Understanding object internals
  • Ipmlementing custom attributes
  • Fine-trained attribute controls with descriptors
  • Memory optimization with slots
  • Customizing instance creation
  • Controlling class creation with metaclasses
  • Augmenting classes with class decorators

Day 2 High Level Python

  • Abstract base classes
  • Relating numeric types with the numeric tower
  • Implementing new numeric types
  • The collections module, array, frozenset, and namedtuple
  • slice objects and extended slicing syntax
  • Nesting generators with yeild from
  • yield as an expression,k and the send()method
  • Coroutines, event pipelines, and reactive programming
  • Controlling the import process with importlib and import()
  • Code-as-data with eval(), compile(), and exec()
  • Using the ast module to work with python's abstract syntax trees
  • Uploading and publishing to the Python Package Index (PyPI)

Privacy Notice

In order to provide you with the service requested we will need to retain and use your contact information in accordance with our Privacy Notice. If you choose to provide us with this information you explicitly consent to us using the information as necessary to provide the requested service to you. If you do not agree please do not proceed to request the service from us.

Marketing Permissions

Would you like to receive our newsletter and other information on products and services which we think will be of interest to you by email. We will always treat your information with care and in accordance with our Privacy Notice. You are free to withdraw this permission at any time.


Online Courses

You may prefer an online course if you are looking for a flexible and cost-effective solution. Online courses allow you to study at your own pace, at a time that suits you.

We have the following eLearning options available:

Our Customers Include