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

Class octlong

Lib/test/test_descr.py:2885–2891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2883 self.assertIs((hexint(0) >> 12).__class__, int)
2884
2885 class octlong(int):
2886 __slots__ = []
2887 def __str__(self):
2888 return oct(self)
2889 def __add__(self, other):
2890 return self.__class__(super(octlong, self).__add__(other))
2891 __radd__ = __add__
2892 self.assertEqual(str(octlong(3) + 5), "0o10")
2893 # (Note that overriding __radd__ here only seems to work
2894 # because the example uses a short int left argument.)

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…