titus.signature.PFAVersion

class titus.signature.PFAVersion(major, minor, release)[source]

Bases: object

Describes a PFA (the language) version number as a triple of major number, minor number, release number (all non-negative integers).

The version has a strict ordering (numerical lexicographic).

Used to specify a version in which to interpret a PFA document and to label the beginning and end of support of function signatures.

It could, in the future, be used to label support ranges of special forms, too, but that would always be managed by hand within the special form’s constructors.

__init__(major, minor, release)

Create a PFAVersion from a major, minor, release number triple (all non-negative integers).

Parameters:
  • major (non-negative integer) – major version number (major changes)
  • minor (non-negative integer) – minor version number (new features)
  • release (non-negative integer) – release version number (bug-fixes)
static fromString(x)

Create a PFAVersion from a dotted string.

Parameters:x (string in the form “major.minor.release”) – string to convert into a PFAVersion
Return type:titus.signature.PFAVersion
Returns:corresponding PFAVersion