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

Method __new__

Lib/test/test_descr.py:1926–1929  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

1924 # Testing __new__ slot override...
1925 class C(list):
1926 def __new__(cls):
1927 self = list.__new__(cls)
1928 self.foo = 1
1929 return self
1930 def __init__(self):
1931 self.foo = self.foo + 2
1932 a = C()

Callers

nothing calls this directly

Calls 1

__new__Method · 0.45

Tested by

no test coverage detected