twisted.names._rfc1982.SerialNumber(FancyStrMixin, object)class documentation
twisted.names._rfc1982View Source (View In Hierarchy)
|Method||__str__||Return a string representation of this
|Method||__eq__||Allow rich equality comparison with another
|Method||__ne__||Allow rich equality comparison with another
|Method||__lt__||Allow less than comparison with another
|Method||__gt__||Allow greater than comparison with another
|Method||__le__||Allow less than or equal comparison with another
|Method||__ge__||Allow greater than or equal comparison with another
|Method||__add__||Allow addition with another
|Class Method||fromRFC4034DateString||Create an
|Method||toRFC4034DateString||Calculate a date by treating the current
|Instance Variable||_modulo||The value at which wrapping will occur.|
|Method||_convertOther||Check that a foreign object is suitable for use in the comparison or
arithmetic magic methods of this
_modulo. If another
SerialNumbervalue is larger than this, it would lead to a wrapped value which is larger than the first and comparisons are therefore ambiguous.
_moduloplus 1. If another
SerialNumbervalue is larger than this, it would lead to a wrapped value which is larger than the first. Comparisons with the original value would therefore be ambiguous.
|Parameters||other||The foreign |
Allow addition with another
Serial numbers may be incremented by the addition of a positive integer n, where n is taken from the range of integers [0 .. (2^(SERIAL_BITS - 1) - 1)]. For a sequence number s, the result of such an addition, s', is defined as
s' = (s + n) modulo (2 ^ SERIAL_BITS)
where the addition and modulus operations here act upon values that are non-negative values of unbounded size in the usual ways of integer arithmetic.
Addition of a value outside the range [0 .. (2^(SERIAL_BITS - 1) - 1)] is undefined.
|Returns|| (type: |
instance stores the date as a 32bit UNIX timestamp.
|Parameters||utcDateString||A UTC date/time string of format YYMMDDhhmmss which will be
converted to seconds since the UNIX epoch. (type: |