I really dislike the fact that case with is instance check looks like instantiation.
case Node(children=[…]) Along with checks for int or enum cases, "is instance” and attribute checks like the one above will be perceived as equality check. Basically what happens is based on context the round brackets () next to the class name mean different things, which will confuse people a lot. If instead the curly brackets {}were used for "match checks” the code would be more explicit about not being an equality check: case Node{children=[…]}
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/KHYARYHNPA5DFMGXX3TYJSDC3FSPU4VH/ Code of Conduct: http://python.org/psf/codeofconduct/