Contribute Media
A thank you to everyone who makes this possible: Read More

Python is Weird

Translations: en

Description

A lot of people think that Python is a really simple and straightforward language. Python hides a lot of peculiarities very well, but for the sake of this talk we will try to uncover them.

I will be explaining how the whole process of tokenizing - parsing - ast creation - bytecode works and will use odd Python code to show the internals. Do you think ++4; is valid Python? Or how about 0jif.1else-2? There's no spaces in it. Go figure! "Edge cases" will help us understand the inner workings of Python.

We will be looking into how modules, classes and instances are really just fancy dictionaries and how importing is really nothing else than storing a module into a dictionary (sys.modules).

There's a lot of things we can learn from diving deep into the details of our beloved languages.

Talk recorded at the Swiss Python Summit on February 17th, 2017.

Licensed as Creative Commons Attribution 4.0 International

Details

Improve this page