3.2.2.6. Byteorder Extensions#
- object.__byteorder__#
The byteorder of a struct can be temporarily configured using the corresponding operator. It is important to note that this attribute is utilized internally and should not be used elsewhere.
>>> struct = BigEndian | struct # Automatically sets __byteorder__
- object.__set_byteorder__(self, byteorder)#
In contrast to the attribute
__byteorder__, the__set_byteorder__()method is invoked to apply the current byteorder to a struct. The default behavior, as described inFieldMixin, is to return a newFieldinstance with the byteorder applied. Note the use of another operator here.>>> field = BigEndian + struct