summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2003-02-10 15:08:16 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2003-02-10 15:08:16 (GMT)
commit72df65ac0e47de0918be58c02d973990d2e45445 (patch)
treef57cf70fc177835c6743b947b4fbf340f6e4534c /Doc
parent2c646c9fc1964603adcc7687016de76effc66a55 (diff)
downloadcpython-72df65ac0e47de0918be58c02d973990d2e45445.zip
cpython-72df65ac0e47de0918be58c02d973990d2e45445.tar.gz
cpython-72df65ac0e47de0918be58c02d973990d2e45445.tar.bz2
Add Neil's suggestions for avoiding this warning
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/whatsnew23.tex12
1 files changed, 10 insertions, 2 deletions
diff --git a/Doc/whatsnew/whatsnew23.tex b/Doc/whatsnew/whatsnew23.tex
index 941f4aa..6d75de2 100644
--- a/Doc/whatsnew/whatsnew23.tex
+++ b/Doc/whatsnew/whatsnew23.tex
@@ -2076,9 +2076,17 @@ wrapped with a \class{_tkinter.Tcl_Obj} object if no Python equivalent
exists.
\item Large octal and hex literals such as
-0xffffffff now trigger a \exception{FutureWarning} because currently
+\code{0xffffffff} now trigger a \exception{FutureWarning}. Currently
they're stored as 32-bit numbers and result in a negative value, but
-in Python 2.4 they'll become positive long integers.
+in Python 2.4 they'll become positive long integers.
+
+There are a few ways to fix this warning. If you really need a
+positive number, just add an \samp{L} to the end of the literal. If
+you're trying to get a 32-bit integer with low bits set and have
+previously used an expression such as \code{~(1 << 31)}, it's probably
+clearest to start with all bits set and clear the desired upper bits.
+For example, to clear just the top bit (bit 31), you could write
+\code{0xffffffffL {\&}{\textasciitilde}(1L<<31)}.
\item You can no longer disable assertions by assigning to \code{__debug__}.