Python __Underscore__ Methods

Need to override an operator in your Python class? Ever wonder what all those double-underscore class methods do? Here’s your answer. Note that thi…

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 »