Version#
- class pyxem.utils.diffraction.Version(version: str)#
Bases:
_BaseVersion
This class abstracts handling of a project’s versions.
A
Version
instance is comparison aware and can be compared and sorted using the standard Python interfaces.>>> v1 = Version("1.0a5") >>> v2 = Version("1.0") >>> v1 <Version('1.0a5')> >>> v2 <Version('1.0')> >>> v1 < v2 True >>> v1 == v2 False >>> v1 > v2 False >>> v1 >= v2 False >>> v1 <= v2 True
Attributes
The "base version" of the version.
The development number of the version.
The epoch of the version.
Whether this version is a development release.
Whether this version is a post-release.
Whether this version is a pre-release.
The local version segment of the version.
The first item of
release
or0
if unavailable.The third item of
release
or0
if unavailable.The second item of
release
or0
if unavailable.The post-release number of the version.
The pre-release segment of the version.
The public portion of the version.
The components of the "release" segment of the version.
Methods