DEV Community

Discussion on: Python: __init__() is not the only constructor

Collapse
 
timconroy profile image
Tim Conroy

Absolutely correct @gabriel
per the Python documentation:
" The new(cls[,...]) method is called first to create a new instance of class, cls. It is a static
method that takes the class of which an instance was requested as its first argument.
The return value of new( ) should be the new object instance(usually an instance of class(cls)). "
Semantics of interpretation of the programming language: It is a class 'static' method. :)>

Thread Thread
 
delta456 profile image
Swastik Baranwal

Yes, its right and I had changed it a long time back!