| 2676 | __attr = "eggs" # mangled to _C__attr |
| 2677 | _Outer__attr = "bacon" |
| 2678 | class Outer: |
| 2679 | def f(self, x): |
| 2680 | match x: |
| 2681 | # looks up __attr, not _C__attr or _Outer__attr |
| 2682 | case C(__attr=y): |
| 2683 | return y |
| 2684 | c = C() |
| 2685 | setattr(c, "__attr", "spam") # setattr is needed because we're in a class scope |
| 2686 | self.assertEqual(Outer().f(c), "spam") |
no outgoing calls
searching dependent graphs…