I was asked to give a lecture (with a presentation) to a group of people about Python.
This class already has a curriculum for Python, and it’s quite long and involves a lot of topics. I was asked to give an advanced lecture, which is not part of the curriculum, about anything I want.
This is not for people who have been developing in Python (or in general) for many years, so it’s not that advanced, but they’re quite sharp and it’s okay if not everyone understands everything thoroughly as long as they get the gist of it. I was also asked that it’d be at least somewhat practical for their use (e.g. I can’t do it about the JIT
)
Last time I did it about how asyncio works, using almost exclusively A. Jesse’s and Guido’s article as inspiration: 500 Lines or LessA Web Crawler With asyncio Coroutines - but was told it’s a bit too complex for people to understand in just one hour.
I was thinking to do it about how to leverage type annotaions in Python, sttarting with a reminder about type annotations, showing cool concepts from typing (Optional, abc’s, ParamSpec, etc.), then moving on to runtime annotations using dataclasses and more advanced concepts like Annotated with pydantic.
I’m looking for more interesting subjects though. I specifically want things which might not be useful to put in a general Python tutorial, but are still cool. Can be about something in Python itself, or about specific libraries (alembic came up) and anything else that is not actually a part of Python. There was also an idea about showing dis and ceval a bit, but I deemed it not practical enough.
I thought this would be a great place to ask as there’s nowhere where people are more passionate about Python. Happy to hear any ideas you might have!