MCPcopy Index your code
hub / github.com/python/cpython / __new__

Method __new__

Lib/test/test_descr.py:6021–6024  ·  view source on GitHub ↗
(mcls, name, bases, attrs)

Source from the content-addressed store, hash-verified

6019 Sets default __doc__ and simplifies repr() output.
6020 """
6021 def __new__(mcls, name, bases, attrs):
6022 if attrs.get('__doc__') is None:
6023 attrs['__doc__'] = name # helps when debugging with gdb
6024 return type.__new__(mcls, name, bases, attrs)
6025 def __repr__(cls):
6026 return repr(cls.__name__)
6027

Callers 15

__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45
__new__Method · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected