dunder-docs (was Python is DOOMED! Again!)
Emile van Sebille
emile at fenx.com
Sun Feb 1 15:51:58 EST 2015
On 2/1/2015 12:45 PM, Chris Angelico wrote:
> Simple answer: You write dunder methods and the interpreter calls
> them. You don't call them yourself.
>
> I can't currently think of any situation where it's appropriate to
> call a dunder method manually (cue the swamping of such situations on
> the list); you just call dir() or the + operator or whatever it be.
calling the parent dunder method from within the overiding new method
comes to mind.
Emile
More information about the Python-list
mailing list