Skip to content

match case boolean mishap (or I am stupid) #94502

Closed as not planned
Closed as not planned
@ghost

Description

a = [1,2,3]
match a:
    case [1, *a]: print('ok')
print(a) # [2, 3]
# case 0: [1, 2, 3]
# case 2: [1, 2, 3]

lst = ['a','b','c']
match lst:
    case ['a', *a]: print('ok')
print(lst) # ['a', 'b', 'c']

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions