mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
objtype: Separate __new__ and __init__ methods.
Now schedule is: for native types, we call ->make_new() C-level method, which should perform actions of __new__ and __init__ (note that this is not compliant, but is efficient), but for user types, __new__ and __init__ are called as expected. Also, make sure we convert scalar attribute value to a bound-pair tight in mp_obj_class_lookup() method, which avoids converting it again and again in its callers.
This commit is contained in:
@@ -34,6 +34,7 @@ Q(__class__)
|
||||
Q(__doc__)
|
||||
Q(__import__)
|
||||
Q(__init__)
|
||||
Q(__new__)
|
||||
Q(__locals__)
|
||||
Q(__main__)
|
||||
Q(__module__)
|
||||
|
||||
Reference in New Issue
Block a user