Closed
Description
Feature or enhancement
class C:
def f(self, x):
match x:
case D(__something=y):
return y
Currently (Python 3.10, 3.11) this matches x.__something
. Under most other circumstances it'd look up x._C__something
. This seems reasonable to me, but doesn't seem to be tested for (so it isn't clear that it's been "decided")
I propose to keep the current behaviour, but add a test so that it's at least "fixed"
Previous discussion
I asked on Python-dev list https://mail.python.org/archives/list/[email protected]/thread/LILLO3MBTVY6ZQT3VNUVXATEPS3ASGQF/ - the one reply suggested the current behaviour was OK