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

Method __new__

Lib/test/test_descr.py:278–281  ·  view source on GitHub ↗
(cls, *args, **kwds)

Source from the content-addressed store, hash-verified

276 class Number(complex):
277 __slots__ = ['prec']
278 def __new__(cls, *args, **kwds):
279 result = complex.__new__(cls, *args)
280 result.prec = kwds.get('prec', 12)
281 return result
282 def __repr__(self):
283 prec = self.prec
284 if self.imag == 0.0:

Callers

nothing calls this directly

Calls 2

__new__Method · 0.45
getMethod · 0.45

Tested by

no test coverage detected