Dead Simple Python by Jason C. McDonald

Dead Simple Python by Jason C. McDonald

Author:Jason C. McDonald [Jason C. McDonald]
Language: eng
Format: epub, pdf
Publisher: No Starch Press
Published: 2022-11-22T00:00:00+00:00


struct Format String and Packing

The byte order, alignment behavior, and data types for struct are determined by the format string, which must be passed to any of the module’s functions, or else to the initializer of the struct.Struct object, which lets you reuse the format string more efficiently.

Often, the first character of the format string defines the byte order and alignment behavior, as in Table 12-9.

Table 12-9: struct Format String Byte Order Flags

Character Behavior

@ Use native byte order and alignment (default).

= Use native byte order, but no alignment.

< Little-endian, no alignment.

> Big-endian, no alignment.

! Network standard: big-endian, no alignment (same as >).



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.