# Version Numbers

## VersionNumber

class `canlib.``VersionNumber`

  A tuple-subclass representing a version number

  Version numbers can be created with from one to three positional arguments, representing the major, minor, and build number respectively:

      v1 = VersionNumber(1)
      v12 = VersionNumber(1, 2)
      v123 = VersionNumber(1, 2, 3)

  Keyword arguments can also be used:

      v1 = VersionNumber(major=1)
      v12 = VersionNumber(major=1, minor=2)
      v123 = VersionNumber(major=1, minor=2, build=3)

  A fourth number, the release number, can also be given as a keyword-only argument:

      v1293 = VersionNumber(major=1, minor=2, release=9, build=3)

  This release number is placed between the minor and build numbers, both for the string representation and in the tuple.

  The major number is required and the other numbers are optional in the order minor, build, release.

  All numbers can be accessed as attributes (`major`, `minor`, `release`, `build`). If the number is unavailable, accessing the attribute returns `None`.

  `beta`
  `build`
  `major`
  `minor`
  `release`

## BetaVersionNumber

class `canlib.``BetaVersionNumber`

  A tuple-subclass representing a beta (preview) version number

  A `VersionNumber` that also has the attribute `beta` set to true.

  New in version 1.6.

  `beta`