(self)
| 3503 | return "forward reference" |
| 3504 | |
| 3505 | def test_method_equal_instances(self): |
| 3506 | # gh-127750: Reference to self was cached |
| 3507 | class A: |
| 3508 | def __eq__(self, other): |
| 3509 | return True |
| 3510 | def __hash__(self): |
| 3511 | return 1 |
| 3512 | @functools.singledispatchmethod |
| 3513 | def t(self, arg): |
| 3514 | return self |
| 3515 | |
| 3516 | a = A() |
| 3517 | b = A() |
| 3518 | self.assertIs(a.t(1), a) |
| 3519 | self.assertIs(b.t(2), b) |
| 3520 | |
| 3521 | def test_method_bad_hash(self): |
| 3522 | class A: |