- Notifications
You must be signed in to change notification settings - Fork1.3k
Open
Description
Feature
https://github.com/RustPython/RustPython/blob/main/vm/src/stdlib/builtins.rs#L899-L919
We should compare betweenclass
(invoked by metaclass) andclasscell
's internal contents before exiting__build_class__
At now we manually set classcell's internal contents withclass
, but this should be done intype.__new__
Python Documentation
- Issue 23722: During metaclass.init, super() of the constructed class does not work - Python tracker
- https://github.com/python/cpython/blob/3.10/Objects/typeobject.c#L3030-L3056
- https://github.com/python/cpython/blob/3.10/Python/bltinmodule.c#L225-L242)
Related test cases
test_super.py
test___classcell___overwrite
test___classcell___missing
test___classcell___wrong_cell
test___class___new
test___class___delayed
Metadata
Metadata
Assignees
Labels
No labels