[issue44617] Undesired Behavior on `match` using Singleton object

2021-07-13 Thread Pablo Aguilar
Pablo Aguilar 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()

[issue44617] Undesired Behavior on `match` using Singleton object

2021-07-13 Thread Pablo Aguilar
Pablo Aguilar added the comment: But, `Maybe.empty` works like a `Literal Pattern` or `Constant Pattern`? -- ___ Python tracker <https://bugs.python.org/issue44

[issue44617] Undesired Behavior on `match` using Singleton object

2021-07-12 Thread Pablo Aguilar
New submission from Pablo Aguilar : Hey, I'm not sure if this is really a bug but I'd like to show to prevent some undesired behavior! I'm working in the `match` support for returns (https://github.com/dry-python/returns) library when I saw a behavior similar to the describ