| 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.) |
no outgoing calls
searching dependent graphs…