[Python-Dev] hex constants, bit patterns, PEP 237 warnings and gettext
Barry A. Warsaw
Wed, 14 Aug 2002 10:53:10 -0400
>>>>> "OT" == Oren Tirosh <firstname.lastname@example.org> writes:
OT> What's wrong with 0x950412de is that with a word width of 32
OT> bits it is negative and therefore the invisible bits to the
OT> left are all set. With a word width of 64 bits or with an
OT> infinite width they are cleared.
My point is that if I write a hex constant I never think about it as a
negative number; it's always an unsigned bit pattern. I know Python
currently disagrees when the bit pattern is 32-bits in width and the
top bit is set, and that PEP 237 is the roadmap to get there from
>>>>> "GvR" == Guido van Rossum <email@example.com> writes:
>> I'm trying to understand why hex constants > sys.maxint have to
GvR> Hm, maybe I should use a different warning category rather
GvR> than DeprecationWarning? Any suggestions?
I think that would help a lot, yes. We had a lively internal
discussion this morning about it and we came up with FutureWarning.
Maybe Guido will come up with a better name, but I don't think it
should be DeprecationWarning. The code that causes the warning isn't
being deprecated, its semantics are destined to be changed, and that
seems like an important distinction.