We start Day 7 by looking at more dunder methods. This time, we focus on Python’s operators. But we’ll also cover combinations of dunder methods that combine to give objects certain characteristics, such as being sequences or mappings.
How Operators Are Linked to Special Methods
00:00 A short video today to get us started. I mentioned this yesterday. I gave the example of the plus what happens when you add two objects. Of course, there are other operators, there are other arithmetic operators, minus, multiplication, division, et cetera.
00:14
But there are also other operators. For example, you might use the keyword in the in
operator to check whether an object is a member of another object.
00:24 All these are core Python features and therefore, and you know the answer by now, there are special methods or dunder methods linked to all of these operators.
You must own this product to join the conversation.