The class macro, derived from the old pylib, still rewrite the init function in a class definition block to a proc starting with "new".
But in Python, there is actually a __new__ method of each class, which is responsible to return a new instance. Thus this issue introduces the new function in a class being supported, and when new is defined, leave init only to init on the new-ed instance, and returns nothing.
The
class
macro, derived from the old pylib, still rewrite theinit
function in aclass
definition block to a proc starting with "new".But in Python, there is actually a
__new__
method of each class, which is responsible to return a new instance. Thus this issue introduces thenew
function in aclass
being supported, and whennew
is defined, leaveinit
only to init on thenew
-ed instance, and returns nothing.