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
This is a feature request / support question I guess.
I am writing a big resolution optimization for Pip that requires understanding if a specifier set is empty, am I correect in assuming the only way to do that at the moment is: str(SpecifierSet()) == ""?
And then if so, my feature request would be to support a __bool__ that is True when the SpecifierSet is not empty and is False when the SpecifierSet is empty. This would save on the sorted call that __str__ makes. Would you be willing to take a PR on this?
The text was updated successfully, but these errors were encountered:
You can do this with len(s) == 0 and it should be relatively cheap. I'm wary of defining __bool__ since it's possible that folks depend on the value being truthy.
This is a feature request / support question I guess.
I am writing a big resolution optimization for Pip that requires understanding if a specifier set is empty, am I correect in assuming the only way to do that at the moment is:
str(SpecifierSet()) == ""
?And then if so, my feature request would be to support a
__bool__
that isTrue
when the SpecifierSet is not empty and is False when the SpecifierSet is empty. This would save on thesorted
call that__str__
makes. Would you be willing to take a PR on this?The text was updated successfully, but these errors were encountered: