A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-February/033045.html below:

[Python-Dev] Negated hex/oct constants (SF #660455)

[Python-Dev] Negated hex/oct constants (SF #660455) [Python-Dev] Negated hex/oct constants (SF #660455)Delaney, Timothy C (Timothy) tdelaney@avaya.com
Thu, 6 Feb 2003 11:42:20 +1100
> From: Guido van Rossum [mailto:guido@python.org]
>=20
> It's quite unsettling:
>=20
>   >>> x =3D 0xffffffff
>   >>> x
>   -1
>   >>> -x
>   1
>   >>> -(0xffffffff)
>   1
>   >>> -0xffffffff=20
>   -4294967295L                          <<<<-------- !!!
>   >>>=20

This is my main concern - that there is an inconsistency between =
-(0xffffffff) and -0xffffffff.

I think whatever is decided, this inconsistency should be fixed for 2.3 =
(and possibly back-ported to 2.2).

So we end up with either

    0xffffffff =3D=3D -1
    -0xffffffff =3D=3D 1

or

    0xffffffff =3D=3D 4294967295L
    -0xffffffff =3D=3D -4294967295L

and 0xffffffff is going to stay as -1 until 2.4 ...

Tim Delaney



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4