Weird Python Integers Part II: Constants in Bytecode

This is a quick follow-up to Weird Python Integers. While writing that post, I saw some Python behaviour I didn’t understand. Then I read some comments by kmill and squeaky-clean in response to my original post, and now I can explain Python’s behaviour. Read more

Similar

My favorite terrible Python error message

Students in my Python classes occasionally get the following error message: TypeError: object() takes no parameters This error message is technically true, as I’ll explain in a moment. But it’s surprising and confusing for people who are new to Python, be... (more…)

Read more »