Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
824563f1
Commit
824563f1
authored
Feb 10, 2003
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Neil's suggestions for avoiding this warning
parent
536c967d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
Doc/whatsnew/whatsnew23.tex
Doc/whatsnew/whatsnew23.tex
+10
-2
No files found.
Doc/whatsnew/whatsnew23.tex
View file @
824563f1
...
@@ -2076,9 +2076,17 @@ wrapped with a \class{_tkinter.Tcl_Obj} object if no Python equivalent
...
@@ -2076,9 +2076,17 @@ wrapped with a \class{_tkinter.Tcl_Obj} object if no Python equivalent
exists.
exists.
\item
Large octal and hex literals such as
\item
Large octal and hex literals such as
0
xffffffff now trigger a
\exception
{
FutureWarning
}
because c
urrently
\code
{
0
xffffffff
}
now trigger a
\exception
{
FutureWarning
}
. C
urrently
they're stored as
32
-
bit numbers and result in a negative value, but
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
{
0
xffffffffL
{
\&
}{
\textasciitilde
}
(
1
L<<
31
)
}
.
\item
You can no longer disable assertions by assigning to
\code
{__
debug
__}
.
\item
You can no longer disable assertions by assigning to
\code
{__
debug
__}
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment