Calling dunder methods manually

Steven D'Aprano steve at
Thu Apr 13 01:29:55 EDT 2017

Should you call dunder methods (Double leading and trailing UNDERscores) 
manually? For example:


The short answer is:

NO! In general, you shouldn't do it.

Guido recently commented:

    I agree that one shouldn't call __init__ manually (and in fact Python
    always reserves the right to have "undefined" behavior when you
    define or use dunder names other than documented).

so unless documented as safe to use manually, you should assume that it 
is not.

This-Public-Service-Announcement-Brought-To-You-By-MyPy-ly y'rs,


More information about the Python-list mailing list