src/pylib/numTypes/ints/int_bytes

Source   Edit  

Procs

func add_from_bytes(res: var NimInt; bytes: PyBytes; byteorder: Endianness;
                    signed = false) {....raises: [], tags: [], forbids: [].}
EXT. Source   Edit  
func from_bytes(_: typedesc[NimInt]; bytes: PyBytes;
                byteorder: static[PyStr] = str("big"); signed = false): NimInt
Admonition: since Python 3.11

this variant uses static param for byteorder

Source   Edit  
func from_bytes(_: typedesc[NimInt]; bytes: PyBytes; byteorder: PyStr;
                signed = false): NimInt
Admonition: since Python 3.2
Source   Edit  
func to_bytes(self: NimInt; length: int; byteorder: PyStr; signed = false): PyBytes {.
    ...raises: [ValueError], tags: [], forbids: [].}
Source   Edit  
func to_bytes(self: NimInt; length: int; byteorder: static[PyStr] = str("big");
              signed = false): PyBytes
Admonition: since Python 3.11
Source   Edit  
func to_chars(self: NimInt; length: int; endianness: Endianness; signed = false): seq[
    char] {....raises: [ValueError], tags: [], forbids: [].}
EXT. Source   Edit