Python Knowledge Sharing Videos Online
I’ve been teaching Python in one hour knowledge sharing sessions, some of which I’ve put online on youtube.
This is the link to the playlist of the sessions:
The slides for each of the sessions, along with some example code, can be found in this github repository:
So far there are seven one-hour sessions (with more planned) on:
- Python Core Object Model
- Python objects
- Slots
- Attribute lookup and the MRO
- Inheritance, multiple inheritance and super
- Inside Python objects and classes
- Closures and decorators (functional programming)
- Functional programming: higher order functions and functions as objects
- Lambdas
- Closures: functions that build functions
- Variable scoping: global, local and nonlocal
- Decorators: functions wrapping functions
- Decorator factories (decorators that take arguments)
- Class decorators
- Decorator order and using functools.wraps
- Generators and Iterators
- The iteration protocol
- Stateful iteration with generators
- Adding iteration support to objects
- References, assignment and mutability
- Identity versus equality
- Call by object
- Object copying
- Unicode, Floats and regex
- Floating point numbers
- Unicode, encodings and strings
- Regular expressions
- Concurrency (async, threads, processes, the GIL)
- The history of concurrency from AmigaOS to a multi-core world
- Python and the Global Interpreter Lock
- I/O bound and CPU bound tasks
- Threads and processes
- Async programming (green threading, coroutines)
- Concurrency with threads
- Concurrency with multiprocessing
- Looking to the future (Python 3.13): optional GIL (PEP 703) and subinterpreters (PEP 554)
- Testing with pytest
- virtual environments and pipenv (installing pytest)
- pytest command line for collecting and running tests
- Simple test functions and asserts
- Test fixtures and conftest.py
- Testing exceptions
- Test parameterisation for test combinations
- Test marking for running test subsets
- Principles of testing (unit tests versus end to end testing, building test helpers etc)
- Mocking and patching
- Modules and Namespaces
- Import syntax variations
- namespaces and variable lookups
- sys.modules and the import cache
- Module objects
- Module level functionality: __dir__ and __getattr__
- Packages and the filesystem
- Relative import syntax
- Module reloading (how to do it and why not to do it)
- Circular imports, avoiding and fixing
- Executable modules and packages
Other Talks
A selection of some of the talks and interviews I’ve given on Python and software engineering across my career.
- UK Health Security Agency Software Development Practise Conf 2024
- PyCon UK 2023, Metaclasses in 5 Minutes Lightning Talk
- PyCon MEA 2022 How Python Took Over the World
- Test and Code Podcast Episode 145: For Those About to Mock
- PyCon Belarus 2020 How Python Took Over the World
- PyLondinium 2019 The Python Object Model
- Interview on Podcast.__init__ on testing, Mock and the Python community (2018)
- The Role of Abstractions: Lightning Talk PyCon US 2018
- Best Practises for Software Development and Testing (2017)
- PyCon UK Panel 2015
- To the Clouds: EuroPython 2015
- Automated Deployments with Juju: PyCon UK 2014
- Python and Pythons: PyCon NZ 2013
- Testing with Mock: PyCon US 2011
- A Little Bit of Python Podcast (2010-11)
- New and Improved unittest 2: PyCon US 2010
- Michael Foord on IronPython: Hanselminutes 2009
- IronPython in Action (2009, book)
- Michael Foord on IronPython: TechEd 2007
Written on November 4, 2024