class documentation

class FixedWidthInteger(Integer):

View In Hierarchy

An integer type of a fixed size.

Method __init__ Build a new integer type of a fixed size.
Method __str__ Returns the nicely printable string representation of this instance.
Method size_bytes The minimal number of bytes necessary to hold an instance of this integer type.
Property endianness Property: The endianness of this integer type.
Property signedness Property: The signedness of this integer type.
Method _possible_sizes Undocumented
Instance Variable _endianness Undocumented
Instance Variable _signedness Undocumented
Instance Variable _size Undocumented

Inherited from Integer:

Method __eq__ Compares the instance for equality with an object.
Method __hash__ Returns the hash for this value.
Method __ne__ Compares the instance for equality with an object.
Method _construct_type Return the underlying construct instance

Inherited from Type (via Integer):

Method description The short description of this type.
Method is_context_sensitive Whether the context argument needed by some methods actually has an effect.
Method parse Parses the value of an instance of this type from a raw buffer, possibly depending on the context.
Method to_bytes Build a byte buffer from a value of this type.
Method _resolve Uses the resolver to return a resolved version of the type, if possible.
def __init__(self, size, signedness, endianness):

Build a new integer type of a fixed size.

Information

Parameters
sizethe size, in bytes, of instance of this integer type
signednessan element of the Signedness enum indicating whether instances of this type are signed
endiannessan element of the Endianness enum indicating the endianness of instances of this type
Raises
ValueErrorif the passed size is negative or null
def __str__(self):

Returns the nicely printable string representation of this instance.

Returns
strUndocumented
def size_bytes(self, context=None):

The minimal number of bytes necessary to hold an instance of this integer type.

Information

Parameters
contextThe context object. See package documentation.
Returns
An integer.
@property
endianness =

Property: The endianness of this integer type.

Information

Returns
An Endianness instance.
@property
signedness =

Property: The signedness of this integer type.

Information

Returns
An Signedness instance.
def _possible_sizes(self):

Undocumented

Returns
_Iterator[int]Undocumented
_endianness =

Undocumented

_signedness =

Undocumented

_size =

Undocumented