You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: