csc.Version

class csc.Version

Version class

Implements Version.

Variables:
  • major – Get set int

  • minor – Get set int

  • patch – Get set int

1import csc
2version = csc.Version.from_string("4.2.1")
3print(version.major)
4print(version.minor)
5print(version.patch)
6print(version.to_string())
__init__(self: csc.Version, major: int, minor: int, patch: int) None

Methods

__init__(self, major, minor, patch)

from_string(arg0)

Create a Version object from a string.

to_string(self)

Get the string representation of the version.

Attributes

major

minor

patch

__annotations__ = {}
__cmp__(self: csc.Version, arg0: csc.Version) int
__eq__(self: csc.Version, arg0: csc.Version) bool
__hash__ = None
__init__(self: csc.Version, major: int, minor: int, patch: int) None
__lt__(self: csc.Version, arg0: csc.Version) bool
__module__ = 'csc'
__ne__(self: csc.Version, arg0: csc.Version) bool
static from_string(arg0: str) csc.Version

Create a Version object from a string.

Parameters:

version (str) – The version string.

Returns:

The Version object.

Return type:

csc.Version

property major
property minor
property patch
to_string(self: csc.Version) str

Get the string representation of the version.

Returns:

The string representation of the version.

Return type:

str