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

Class Outer

Lib/test/test_patma.py:2678–2683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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")

Callers 1

test_patma_249Method · 0.70

Calls

no outgoing calls

Tested by 1

test_patma_249Method · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…