An encapsulation of a version for a project, with support for outputting PEP-440 compatible version strings.
This class supports the standard major.minor.micro[rcN] scheme of versioning.
|Method||public||Return a PEP440-compatible "public" representation of this
|Method||__cmp__||Compare two versions, considering major versions, minor versions, micro versions, then release candidates. Package names are case insensitive.|
|Parameters||package||Name of the package that this is a version of. (type: |
|major||The major version number. (type: |
|minor||The minor version number. (type: |
|micro||The micro version number. (type: |
|release_candidate||The release candidate number. (type: |
|prerelease||The prerelease number. (Deprecated) (type: |
|dev||The development release number. (type: |
Return a PEP440-compatible "public" representation of this
Compare two versions, considering major versions, minor versions, micro versions, then release candidates. Package names are case insensitive.
A version with a release candidate is always less than a version without a release candidate. If both versions have release candidates, they will be included in the comparison.
|Parameters||other||Another version. (type: |
|Returns||NotImplemented when the other object is not a Version, or one of -1, 0, or 1.|
|Raises||IncomparableVersions||when the package names of the versions differ.|