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
e9fca253
Commit
e9fca253
authored
Jan 25, 2012
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
say bitwise (because I have no idea what a bit-string is)
parent
a50c2840
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+6
-6
No files found.
Doc/library/stdtypes.rst
View file @
e9fca253
...
...
@@ -379,12 +379,12 @@ modules.
.. _bitstring-ops:
Bit
-string
Operations on Integer Types
Bit
wise
Operations on Integer Types
--------------------------------------
.. index::
triple: operations on; integer; types
pair: bit
-string
; operations
pair: bit
wise
; operations
pair: shifting; operations
pair: masking; operations
operator: ^
...
...
@@ -392,15 +392,15 @@ Bit-string Operations on Integer Types
operator: <<
operator: >>
Integers support additional operations that make sense only for bit-strings.
Negative numbers are treated as their 2's complement value (this assumes a
sufficiently large number
of bits that no overflow occurs during the operation).
Bitwise operations only make sense only for integers. Negative numbers are
treated as their 2's complement value (this assumes a sufficiently large number
of bits that no overflow occurs during the operation).
The priorities of the binary bitwise operations are all lower than the numeric
operations and higher than the comparisons; the unary operation ``~`` has the
same priority as the other unary numeric operations (``+`` and ``-``).
This table lists the bit
-string
operations sorted in ascending priority
This table lists the bit
wise
operations sorted in ascending priority
(operations in the same box have the same priority):
+------------+--------------------------------+----------+
...
...
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