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

Method with_val

Lib/test/test_capi/test_number.py:29–34  ·  view source on GitHub ↗
(cls, val)

Source from the content-addressed store, hash-verified

27 raise self.exc
28 @classmethod
29 def with_val(cls, val):
30 obj = super().__new__(cls)
31 obj.val = val
32 obj.exc = None
33 setattr(cls, cls.methname, cls._meth)
34 return obj
35
36 @classmethod
37 def with_exc(cls, exc):

Callers 5

test_checkMethod · 0.80
test_misc_powerMethod · 0.80
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