Bug report
While attempting to use match to extract an element from a singleton set, I stumbled across a weird matching pattern:
s = set('A')
match s:
case set(x):
print(x is s) # Prints True
For some reason, the x variable gets assigned to the collection itself, instead of the contents. Is this intended?
cpython 3.11.1
Bug report
While attempting to use
matchto extract an element from a singleton set, I stumbled across a weird matching pattern:For some reason, the
xvariable gets assigned to the collection itself, instead of the contents. Is this intended?cpython 3.11.1