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'm trying to use object comparison but I'm not getting the expected results:
>>>importsemver>>>v1='0.10.4'>>>v2='0.10.4-beta.1'"""from: semver#compareThe return value is negative if ver1 < ver2,zero if ver1 == ver2 and strictly positive if ver1 > ver2""">>>semver.compare(v1, v2) >0True>>>semver.compare(v2, v1) <0True# until here, everythings works as expected>>>v1o=semver.parse_version_info(v1)
>>>v2o=semver.parse_version_info(v2)
>>>v1oVersionInfo(major=0, minor=10, patch=4, prerelease=None, build=None)
>>>v2oVersionInfo(major=0, minor=10, patch=4, prerelease='beta.1', build=None)
# this is where things go wrong:>>>v1o>v2oFalse>>>v2o<v1oFalse
The text was updated successfully, but these errors were encountered:
Hi there!
I'm trying to use object comparison but I'm not getting the expected results:
The text was updated successfully, but these errors were encountered: