dir(python)

Introduction

This site contains course notes originally developed for MPCS 50142: Python Programming and 51052: Advanced Python Programming.

These notes assume some familiarity Python and programming, but are interested in having a much better understanding of both.

If you find them useful, or notice any issues, let me know.

Topics

Python as a multi-paradigm language. Introducing procedural, functional & object-oriented programming with Python.

Python as an evolving language. What’s new in Python? How and why does the language evolve & what has been added recently? What tools are Python developers using today?

Metaprogramming & “power-user” features. What are the parts of Python’s syntax & libraries that aren’t used every day that can lead to more expressive code? We’ll look at generators/coroutines, context managers, decorators, descriptors & other features typically not covered in earlier courses. How do they work internally? When do you use them?

Python & the web. Why is Python such a popular language for web development? We’ll use this as a jumping off point to discuss trade-offs in library design and work with libraries like Django, Flask, Starlette, FastAPI, etc.

Asynchronous programming in Python. What is the GIL? Why are there so many ways to do asynchronous work in Python & which are worth using? We’ll also explore some async web frameworks to see real-world usage.

Making Python faster. How to write the most performant Python you can, and what to do when that still isn’t fast enough. We’ll touch on Python’s C API, PyPy and other alternate interpreters, and enhancing Python with Rust.