You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just found this behavior a little surprising, and I feel like I'd be prone to make the assumption that a == b => not(a != b), doesn't seem to be mentioned in the docs: https://packaging.pypa.io/en/latest/specifiers.html
In [9]: lt4 = packaging.specifiers.Specifier("<4")
In [10]: lt4point0 = packaging.specifiers.Specifier("<4.0")
In [11]: lt4 == lt4point0
Out[11]: True
In [12]: lt4 != lt4point0
Out[12]: True
The text was updated successfully, but these errors were encountered:
pradyunsg
changed the title
Possibly Confusing Specifier Behavior?
Mismatched comparison operations for Specifiers
Oct 11, 2021
I just found this behavior a little surprising, and I feel like I'd be prone to make the assumption that
a == b
=>not(a != b)
, doesn't seem to be mentioned in the docs: https://packaging.pypa.io/en/latest/specifiers.htmlThe text was updated successfully, but these errors were encountered: