Pablo Aguilar <[email protected]> added the comment:
In fact, I'm worried about how to explain some behaviors.
Look here:
```python
# `Maybe` here is the same class described in the first message
Nothing = Maybe()
Maybe.empty = Nothing
if __name__ == '__main__':
my_maybe = Maybe()
match my_maybe:
case Nothing:
print('FIRST CASE')
case _:
print('DEFAULT CASE')
```
I can't use `Nothing` to match the values even though it's a variable but using
`Maybe.empty` it works.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue44617>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com