COURSE

Advanced Python

In depth Python Programming training for experienced engineers.

  • 2-3 Days
  • Intermediate
  • In-person / Online
  • £ On Request

Your team will learn...

Understand imperative, object-oriented and functional programming in Python

Deep dive into functional programming, comprehensions and generators

Learn how to write clean, maintainable, Pythonic code

Using testing to build confidence in your code

Overview

This course provides an accelerated Python training experience. It accelerates experienced coders from zero knowledge to mastery of the language. Intermediate Pythonistas can use this delivery to explore advanced topics such as Decorators, Type Hints and Functional Programming.

All the important features of Python 3 will be explained using practical examples and exercises.

Outline

Foundations

  • Understanding the Core Types
  • Sets, lists, dictionaries and tuples
  • Performing Basic I/O
  • Selection, Iteration and Functions
  • Identity, equality and references

Functions in Depth

  • Declaring functions and passing parameters
  • Using defaults and keyword arguments
  • Writing variadic functions
  • Performing parameter expansion
  • Scope and the lifetime of a variable
  • Managing errors with try clauses

Deep Dive on Object Orientation

  • Class syntax - adding attributes and operations
  • Understanding and utilising dunder methods
  • Guidelines for overloading operators sensibly
  • Using unpacking to break apart structures
  • Creating class hierarchies in Python
  • The intrinsic class and object attributes
  • Creating your own iterator objects and generators
  • Intercept and augment method calls via decorators

Functional Programming

  • Using functions as inputs to other functions
  • Building and returning functions from functions
  • Understanding scope and closures
  • Creating and working with lambda functions
  • Using lambdas with filter, map and reduce
  • Simplifying your code using list comprehensions
  • Exploring the itertools and functools packages

Organising Code and Modules

  • Understanding PIP and Python Packages
  • Using virtualenv to scope environments
  • Using 'pipenv' for dependencies
  • Organizing your code into modules and packages
  • Understanding symbol tables and accessing them in code

Performing Common Tasks

  • Creating your own command line tools
  • Using setuptools to package CLI scripts
  • Interacting with the operating system
  • Exploring the filesystem
  • Understanding streams and various types of I/O
  • Reading and writing text, data and objects to/from files
  • Managing resources via the with statement
  • Working with RESTful web services

Clean Code

  • Why code quality matters
  • Refactoring to enhance quality
  • What it means to be Pythonic
  • Python Style Guide and PEP 8
  • Python Linting Solutions
  • Type Hints to Improve Development
  • Using TDD within Python
  • Comparing doctest, unittest and py.test

Requirements

Several years experience programming in a modern programming language. Python experience is not required, but early topics can be removed if delegates have basic Python knowledge.

COURSE

Advanced Python

In depth Python Programming training for experienced engineers.

  • 2-3 Days
  • Intermediate
  • In-person / Online
  • £ On Request

Deloitte logo
Atlassian logo
Bose logo
Workday logo
BMW logo
Amex logo
McAfee logo
PWC logo