bytesize._errors module

Exception types used by the bytesize class.

exception bytesize._errors.SizeError

Bases: exceptions.Exception

Generic Size error.

exception bytesize._errors.SizeFractionalResultError

Bases: bytesize._errors.SizeUnrepresentableResultError

Error when Size construction is strict.

exception bytesize._errors.SizeNonsensicalBinOpError(operator, other)

Bases: bytesize._errors.SizeNonsensicalOpError

Error when requesting a binary operation that doesn’t make sense.

exception bytesize._errors.SizeNonsensicalBinOpValueError(operator, other)

Bases: bytesize._errors.SizeNonsensicalOpError

Error when requesting a binary operation with a nonsense value.

exception bytesize._errors.SizeNonsensicalOpError

Bases: bytesize._errors.SizeUnsupportedOpError

Error when requesting an operation that doesn’t make sense.

exception bytesize._errors.SizePowerResultError

Bases: bytesize._errors.SizeUnrepresentableResultError

Error when requesting an operation that would yield a byte power.

exception bytesize._errors.SizeUnrepresentableResultError

Bases: bytesize._errors.SizeUnsupportedOpError

Error when requesting an operation that yields units that cannot be represented with Size, e.g., when multiplying a Size by a Size.

exception bytesize._errors.SizeUnsupportedOpError

Bases: bytesize._errors.SizeError

Error when executing unsupported operation on Size.

exception bytesize._errors.SizeValueError(value, param, msg=None)

Bases: bytesize._errors.SizeError

Raised when a parameter has an unacceptable value.

May also be raised when the parameter has an unacceptable type.

Previous topic

bytesize._constants module

Next topic

bytesize._radix module

This Page