[Python-checkins] r74200 - python/trunk/Doc/library/stdtypes.rst
georg.brandl
python-checkins at python.org
Sat Jul 25 15:02:16 CEST 2009
Author: georg.brandl
Date: Sat Jul 25 15:02:15 2009
New Revision: 74200
Log:
#6571: add index entries for more operators.
Modified:
python/trunk/Doc/library/stdtypes.rst
Modified: python/trunk/Doc/library/stdtypes.rst
==============================================================================
--- python/trunk/Doc/library/stdtypes.rst (original)
+++ python/trunk/Doc/library/stdtypes.rst Sat Jul 25 15:02:15 2009
@@ -129,7 +129,17 @@
Comparisons
===========
-.. index:: pair: chaining; comparisons
+.. index::
+ pair: chaining; comparisons
+ pair: operator; comparison
+ operator: ==
+ operator: <
+ operator: <=
+ operator: >
+ operator: >=
+ operator: !=
+ operator: is
+ operator: is not
Comparison operations are supported by all objects. They all have the same
priority (which is higher than that of the Boolean operations). Comparisons can
@@ -159,17 +169,6 @@
| ``is not`` | negated object identity | |
+------------+-------------------------+-------+
-.. index::
- pair: operator; comparison
- operator: ==
- operator: <
- operator: <=
- operator: >
- operator: >=
- operator: !=
- operator: is
- operator: is not
-
Notes:
(1)
@@ -262,6 +261,13 @@
builtin: long
builtin: float
builtin: complex
+ operator: +
+ operator: -
+ operator: *
+ operator: /
+ operator: //
+ operator: %
+ operator: **
Python fully supports mixed arithmetic: when a binary arithmetic operator has
operands of different numeric types, the operand with the "narrower" type is
@@ -394,7 +400,15 @@
Bit-string Operations on Integer Types
--------------------------------------
-.. _bit-string-operations:
+.. index::
+ triple: operations on; integer; types
+ pair: bit-string; operations
+ pair: shifting; operations
+ pair: masking; operations
+ operator: ^
+ operator: &
+ operator: <<
+ operator: >>
Plain and long integer types support additional operations that make sense only
for bit-strings. Negative numbers are treated as their 2's complement value
@@ -426,12 +440,6 @@
| ``~x`` | the bits of *x* inverted | |
+------------+--------------------------------+----------+
-.. index::
- triple: operations on; integer; types
- pair: bit-string; operations
- pair: shifting; operations
- pair: masking; operations
-
Notes:
(1)
More information about the Python-checkins
mailing list