Package tdi :: Module _version :: Class Version
[frames] | no frames]

Class Version

source code

object --+    
         |    
     tuple --+
             |
            Version

Container representing the package version
Instance Methods
 
__init__(self, versionstring, is_dev, revision)
Initialization
source code
str
__repr__(self)
Create a development string representation
source code
str
__str__(self)
Create a version like string representation
source code
unicode
__unicode__(self)
Create a version like unicode representation
source code

Inherited from tuple: __add__, __contains__, __eq__, __ge__, __getattribute__, __getitem__, __getnewargs__, __getslice__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __rmul__, count, index

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Static Methods
version
__new__(cls, versionstring, is_dev, revision)
Construction
source code
Instance Variables
bool is_dev
Is it a development version?
int major
The major version number
int minor
The minor version number
int patch
The patch level version number
int revision
Internal revision
Properties

Inherited from object: __class__

Method Details

__new__(cls, versionstring, is_dev, revision)
Static Method

source code 
Construction
Parameters:
  • versionstring (str) - The numbered version string (like "1.1.0") It should contain at least three dot separated numbers
  • is_dev (bool) - Is it a development version?
  • revision (int) - Internal revision
Returns: version
New version instance
Overrides: object.__new__

__init__(self, versionstring, is_dev, revision)
(Constructor)

source code 
Initialization
Parameters:
  • versionstring (str) - The numbered version string (like 1.1.0) It should contain at least three dot separated numbers
  • is_dev (bool) - Is it a development version?
  • revision (int) - Internal revision
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 
Create a development string representation
Returns: str
The string representation
Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 
Create a version like string representation
Returns: str
The string representation
Overrides: object.__str__

__unicode__(self)

source code 
Create a version like unicode representation
Returns: unicode
The unicode representation

Instance Variable Details

is_dev

Is it a development version?
Type:
bool

major

The major version number
Type:
int

minor

The minor version number
Type:
int

patch

The patch level version number
Type:
int

revision

Internal revision
Type:
int