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

Method with_exc

Lib/test/test_capi/test_number.py:37–42  ·  view source on GitHub ↗
(cls, exc)

Source from the content-addressed store, hash-verified

35
36 @classmethod
37 def with_exc(cls, exc):
38 obj = super().__new__(cls)
39 obj.val = None
40 obj.exc = exc
41 setattr(cls, cls.methname, cls._meth)
42 return obj
43
44class HasBadAttr:
45 def __new__(cls):

Callers 3

test_longMethod · 0.80
test_floatMethod · 0.80
test_indexMethod · 0.80

Calls 2

superClass · 0.85
__new__Method · 0.45

Tested by

no test coverage detected