MCPcopy Index your code
hub / github.com/RustPython/RustPython / Outer

Class Outer

Lib/test/test_patma.py:2681–2686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2679 __attr = "eggs" # mangled to _C__attr
2680 _Outer__attr = "bacon"
2681 class Outer:
2682 def f(self, x):
2683 match x:
2684 # looks up __attr, not _C__attr or _Outer__attr
2685 case C(__attr=y):
2686 return y
2687 c = C()
2688 setattr(c, "__attr", "spam") # setattr is needed because we're in a class scope
2689 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