ciao Roberto,
Il giorno gio 21 ott 2021 alle ore 11:15 Roberto De Ioris
ha scritto:
> Ciao, perche' di default viene rispettato l'allineamento che il dato
> dovrebbe avere in memoria se fosse una struttura c:
>
> https://docs.python.org/3/library/struct.html#struct-alignment
>
> Roberto De Ioris
Ciao, perche' di default viene rispettato l'allineamento che il dato
dovrebbe avere in memoria se fosse una struttura c:
https://docs.python.org/3/library/struct.html#struct-alignment
Roberto De Ioris
Il giorno gio 21 ott 2021 alle ore 11:12 Marco De Paoli
ha scritto:
> ciao a tutti!
> ho un p
ciao a tutti!
ho un problema con struct.unpack e non capisco cosa sto sbagliando...
>>> struct.unpack("i", b'\x03\x00\x00\x00') # OK!
(3,)
>>> struct.unpack("ih", b'\x03\x00\x00\x00\x04\x00') # OK!
(3, 4)
>>> struct.unpack("ihi", b'\x03\x00\x00\x00\x04\x00\x00\x00\x04\x00') #
ARGHHH
Traceback (