-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Feature
type.__prepare__
can receive 0 arguments in CPython
:
Python 3.9.4 (default, Apr 5 2021, 01:47:16)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> type.__prepare__()
{}
The same happens with 3.8
.
But, RustPython
requires to pass 2 args:
Welcome to the magnificent Rust Python 0.1.2 interpreter 😱 🖖
>>>>> type.__prepare__()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Expected at least 2 arguments (0 given)
Python Documentation
https://docs.python.org/3/reference/datamodel.html#preparing-the-class-namespace
https://www.python.org/dev/peps/pep-3115/#invoking-the-metaclass
Metadata
Metadata
Assignees
Labels
No labels