deprecated python 2.5
bussiere maillist
bussieremaillist at gmail.com
Tue Sep 12 07:47:39 EDT 2006
thks
Regards
Bussiere
On 9/12/06, Fredrik Lundh <fredrik at pythonware.com> wrote:
> bussiere maillist wrote:
>
> > DeprecationWarning: struct integer overflow masking is deprecated
> > return struct.pack('>H', ~value)
> > i didn't understand if someone have some explanation
> > and what uses instead.
>
> the value doesn't fit in 16 bits. try masking off the extra bits on the
> way in:
>
> struct.pack("<H", (~value) & 0xFFFF)
>
> </F>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list