MCPcopy Index your code
hub / github.com/RustPython/RustPython / __new__

Method __new__

extra_tests/snippets/syntax_class.py:269–273  ·  view source on GitHub ↗
(mcls)

Source from the content-addressed store, hash-verified

267
268class A(type):
269 def __new__(mcls):
270 assert type(mcls.__new__).__name__ == 'function'
271 assert type(mcls.mro).__name__ == 'method_descriptor'
272 assert type(super().__new__).__name__ in ['builtin_function_or_method', 'builtin_method']
273 assert type(super().mro).__name__ == 'method_descriptor'
274
275class B(type):
276 def x(self):

Callers 3

builtin_int.pyFile · 0.45

Calls 1

superClass · 0.85

Tested by

no test coverage detected