RustPython icon indicating copy to clipboard operation
RustPython copied to clipboard

Need compare between `metaclass` and internal contents of `classcell` in `__build_class__`

Open Snowapril opened this issue 1 year ago • 1 comments

Feature

https://github.com/RustPython/RustPython/blob/main/vm/src/stdlib/builtins.rs#L899-L919 We should compare between class (invoked by metaclass) and classcell's internal contents before exiting __build_class__ At now we manually set classcell's internal contents with class, but this should be done in type.__new__

Python Documentation

Related test cases

  • test_super.py
    • test___classcell___overwrite
    • test___classcell___missing
    • test___classcell___wrong_cell
    • test___class___new
    • test___class___delayed

Snowapril avatar Jul 10 '22 23:07 Snowapril

#3986 maybe related but not solved yet

youknowone avatar Feb 25 '23 15:02 youknowone