Merged revisions 74074,74077,74111,74188,74192-74193,74200,74252-74253,74258-74261 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74074 | georg.brandl | 2009-07-18 05:03:10 -0400 (Sat, 18 Jul 2009) | 1 line
#6513: fix example code: warning categories are classes, not instances.
........
r74077 | georg.brandl | 2009-07-18 05:43:40 -0400 (Sat, 18 Jul 2009) | 1 line
#6489: fix an ambiguity in getiterator() documentation.
........
r74111 | benjamin.peterson | 2009-07-20 09:30:10 -0400 (Mon, 20 Jul 2009) | 1 line
remove docs for deprecated -p option
........
r74188 | benjamin.peterson | 2009-07-23 10:25:31 -0400 (Thu, 23 Jul 2009) | 1 line
use bools
........
r74192 | georg.brandl | 2009-07-24 12:28:38 -0400 (Fri, 24 Jul 2009) | 1 line
Fix arg types of et#.
........
r74193 | georg.brandl | 2009-07-24 12:46:38 -0400 (Fri, 24 Jul 2009) | 1 line
Dont put "void" in signature for nullary functions.
........
r74200 | georg.brandl | 2009-07-25 09:02:15 -0400 (Sat, 25 Jul 2009) | 1 line
#6571: add index entries for more operators.
........
r74252 | georg.brandl | 2009-07-29 12:06:31 -0400 (Wed, 29 Jul 2009) | 1 line
#6593: fix link targets.
........
r74253 | georg.brandl | 2009-07-29 12:09:17 -0400 (Wed, 29 Jul 2009) | 1 line
#6591: add reference to ioctl in fcntl module for platforms other than Windows.
........
r74258 | georg.brandl | 2009-07-29 12:57:05 -0400 (Wed, 29 Jul 2009) | 1 line
Add a link to readline, and mention IPython and bpython.
........
r74259 | georg.brandl | 2009-07-29 13:07:21 -0400 (Wed, 29 Jul 2009) | 1 line
Fix some markup and small factual glitches found by M. Markert.
........
r74260 | georg.brandl | 2009-07-29 13:15:20 -0400 (Wed, 29 Jul 2009) | 1 line
Fix a few markup glitches.
........
r74261 | georg.brandl | 2009-07-29 13:50:25 -0400 (Wed, 29 Jul 2009) | 1 line
Rewrite the section about classes a bit; mostly tidbits, and a larger update to the section about "private" variables to reflect the Pythonic consensus better.
........
diff --git a/Doc/library/2to3.rst b/Doc/library/2to3.rst
index 29ab066..f37bb05 100644
--- a/Doc/library/2to3.rst
+++ b/Doc/library/2to3.rst
@@ -86,13 +86,6 @@
The :option:`-v` option enables output of more information on the translation
process.
-When the :option:`-p` is passed, the :2to3fixer:`print` fixer ``print`` as a
-function instead of a statement. This is useful when ``from __future__ import
-print_function`` is being used. If this option is not given, the print fixer
-will surround print calls in an extra set of parentheses because it cannot
-differentiate between the print statement with parentheses (such as ``print
-("a" + "b" + "c")``) and a true function call.
-
.. _2to3-fixers:
diff --git a/Doc/library/gettext.rst b/Doc/library/gettext.rst
index a29d953..eba59c8 100644
--- a/Doc/library/gettext.rst
+++ b/Doc/library/gettext.rst
@@ -194,7 +194,7 @@
:func:`translation`.
For the *names* parameter, please see the description of the translation
- object's :meth:`install` method.
+ object's :meth:`~NullTranslations.install` method.
As seen below, you usually mark the strings in your application that are
candidates for translation, by wrapping them in a call to the :func:`_`
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index cda8fee..e6ad578 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -555,6 +555,8 @@
The :meth:`ioctl` method is a limited interface to the WSAIoctl system
interface. Please refer to the MSDN documentation for more information.
+ On other platforms, the generic :func:`fcntl.fcntl` and :func:`fcntl.ioctl`
+ functions may be used; they accept a socket object as their first argument.
.. method:: socket.listen(backlog)
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 04d0b5d..14ad15e 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -120,7 +120,17 @@
Comparisons
===========
-.. index:: pair: chaining; comparisons
+.. index::
+ pair: chaining; comparisons
+ pair: operator; comparison
+ operator: ==
+ operator: <
+ operator: <=
+ operator: >
+ operator: >=
+ operator: !=
+ operator: is
+ operator: is not
There are eight comparison operations in Python. They all have the same
priority (which is higher than that of the Boolean operations). Comparisons can
@@ -128,17 +138,6 @@
y <= z``, except that *y* is evaluated only once (but in both cases *z* is not
evaluated at all when ``x < y`` is found to be false).
-.. index::
- pair: operator; comparison
- operator: ==
- operator: <
- operator: >
- operator: <=
- operator: >=
- operator: !=
- operator: is
- operator: is not
-
This table summarizes the comparison operations:
+------------+-------------------------+
@@ -248,6 +247,13 @@
builtin: int
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
@@ -368,7 +374,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: >>
Integers support additional operations that make sense only for bit-strings.
Negative numbers are treated as their 2's complement value (this assumes a
@@ -400,12 +414,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)
diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst
index f6856ff..1574e27 100644
--- a/Doc/library/warnings.rst
+++ b/Doc/library/warnings.rst
@@ -206,7 +206,7 @@
fxn()
# Verify some things
assert len(w) == 1
- assert isinstance(w[-1].category, DeprecationWarning)
+ assert issubclass(w[-1].category, DeprecationWarning)
assert "deprecated" in str(w[-1].message)
One can also cause all warnings to be exceptions by using ``error`` instead of
diff --git a/Doc/library/webbrowser.rst b/Doc/library/webbrowser.rst
index 86a9043..01720d1 100644
--- a/Doc/library/webbrowser.rst
+++ b/Doc/library/webbrowser.rst
@@ -46,14 +46,14 @@
The following functions are defined:
-.. function:: open(url[, new=0[, autoraise=1]])
+.. function:: open(url[, new=0[, autoraise=True]])
- Display *url* using the default browser. If *new* is 0, the *url* is opened in
- the same browser window if possible. If *new* is 1, a new browser window is
- opened if possible. If *new* is 2, a new browser page ("tab") is opened if
- possible. If *autoraise* is true, the window is raised if possible (note that
- under many window managers this will occur regardless of the setting of this
- variable).
+ Display *url* using the default browser. If *new* is 0, the *url* is opened
+ in the same browser window if possible. If *new* is 1, a new browser window
+ is opened if possible. If *new* is 2, a new browser page ("tab") is opened
+ if possible. If *autoraise* is ``True``, the window is raised if possible
+ (note that under many window managers this will occur regardless of the
+ setting of this variable).
Note that on some platforms, trying to open a filename using this function,
may work and start the operating system's associated program. However, this
@@ -175,7 +175,7 @@
module-level convenience functions:
-.. method:: controller.open(url[, new[, autoraise=1]])
+.. method:: controller.open(url[, new[, autoraise=True]])
Display *url* using the browser handled by this controller. If *new* is 1, a new
browser window is opened if possible. If *new* is 2, a new browser page ("tab")
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst
index a04b04a..939af6e 100644
--- a/Doc/library/xml.etree.elementtree.rst
+++ b/Doc/library/xml.etree.elementtree.rst
@@ -262,9 +262,9 @@
.. method:: Element.getiterator([tag=None])
Creates a tree iterator with the current element as the root. The iterator
- iterates over this element and all elements below it that match the given tag.
- If tag is ``None`` or ``'*'`` then all elements are iterated over. Returns an
- iterable that provides element objects in document (depth first) order.
+ iterates over this element and all elements below it, in document (depth first)
+ order. If *tag* is not ``None`` or ``'*'``, only elements whose tag equals
+ *tag* are returned from the iterator.
.. method:: Element.insert(index, element)