Does any method get called when an object is evaluated? /u/Informal-Addendum435 Python Education

In expressions like

x 

and

x + y 

What are all the methods that get called on x ?

In the second case, __add__ will be called.

Is there a method that will be called in the first case?

submitted by /u/Informal-Addendum435
[link] [comments]

​r/learnpython In expressions like x and x + y What are all the methods that get called on x ? In the second case, __add__ will be called. Is there a method that will be called in the first case? submitted by /u/Informal-Addendum435 [link] [comments] 

In expressions like

x 

and

x + y 

What are all the methods that get called on x ?

In the second case, __add__ will be called.

Is there a method that will be called in the first case?

submitted by /u/Informal-Addendum435
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *