Merge heads.
diff --git a/Doc/faq/design.rst b/Doc/faq/design.rst
index 04c8c1f..724eecf 100644
--- a/Doc/faq/design.rst
+++ b/Doc/faq/design.rst
@@ -862,8 +862,8 @@
When you have a literal value for a list, tuple, or dictionary spread across
multiple lines, it's easier to add more elements because you don't have to
-remember to add a comma to the previous line. The lines can also be sorted in
-your editor without creating a syntax error.
+remember to add a comma to the previous line. The lines can also be reordered
+without creating a syntax error.
Accidentally omitting the comma can lead to errors that are hard to diagnose.
For example::
diff --git a/Doc/howto/sockets.rst b/Doc/howto/sockets.rst
index ca6528b..151e2c8 100644
--- a/Doc/howto/sockets.rst
+++ b/Doc/howto/sockets.rst
@@ -84,9 +84,11 @@
serversocket.listen(5)
A couple things to notice: we used ``socket.gethostname()`` so that the socket
-would be visible to the outside world. If we had used ``s.bind(('', 80))`` or
-``s.bind(('localhost', 80))`` or ``s.bind(('127.0.0.1', 80))`` we would still
-have a "server" socket, but one that was only visible within the same machine.
+would be visible to the outside world. If we had used ``s.bind(('localhost',
+80))`` or ``s.bind(('127.0.0.1', 80))`` we would still have a "server" socket,
+but one that was only visible within the same machine. ``s.bind(('', 80))``
+specifies that the socket is reachable by any address the machine happens to
+have.
A second thing to note: low number ports are usually reserved for "well known"
services (HTTP, SNMP etc). If you're playing around, use a nice high number (4
diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst
index 115ce10..06dfe80 100644
--- a/Doc/library/collections.abc.rst
+++ b/Doc/library/collections.abc.rst
@@ -128,7 +128,7 @@
particular functionality, for example::
size = None
- if isinstance(myvar, collections.Sized):
+ if isinstance(myvar, collections.abc.Sized):
size = len(myvar)
Several of the ABCs are also useful as mixins that make it easier to develop
@@ -138,7 +138,7 @@
The ABC supplies the remaining methods such as :meth:`__and__` and
:meth:`isdisjoint`::
- class ListBasedSet(collections.Set):
+ class ListBasedSet(collections.abc.Set):
''' Alternate set implementation favoring space over speed
and not requiring the set elements to be hashable. '''
def __init__(self, iterable):
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index c866f84..c0132bd 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -84,14 +84,13 @@
definition begins with two or more underscore characters and does not end in two
or more underscores, it is considered a :dfn:`private name` of that class.
Private names are transformed to a longer form before code is generated for
-them. The transformation inserts the class name in front of the name, with
-leading underscores removed, and a single underscore inserted in front of the
-class name. For example, the identifier ``__spam`` occurring in a class named
-``Ham`` will be transformed to ``_Ham__spam``. This transformation is
-independent of the syntactical context in which the identifier is used. If the
-transformed name is extremely long (longer than 255 characters), implementation
-defined truncation may happen. If the class name consists only of underscores,
-no transformation is done.
+them. The transformation inserts the class name, with leading underscores
+removed and a single underscore inserted, in front of the name. For example,
+the identifier ``__spam`` occurring in a class named ``Ham`` will be transformed
+to ``_Ham__spam``. This transformation is independent of the syntactical
+context in which the identifier is used. If the transformed name is extremely
+long (longer than 255 characters), implementation defined truncation may happen.
+If the class name consists only of underscores, no transformation is done.
.. _atom-literals:
diff --git a/Doc/using/mac.rst b/Doc/using/mac.rst
index 075a359..3e1b74d 100644
--- a/Doc/using/mac.rst
+++ b/Doc/using/mac.rst
@@ -17,14 +17,15 @@
Getting and Installing MacPython
================================
-Mac OS X 10.5 comes with Python 2.5.1 pre-installed by Apple. If you wish, you
-are invited to install the most recent version of Python from the Python website
-(http://www.python.org). A current "universal binary" build of Python, which
-runs natively on the Mac's new Intel and legacy PPC CPU's, is available there.
+Mac OS X 10.8 comes with Python 2.7 pre-installed by Apple. If you wish, you
+are invited to install the most recent version of Python 3 from the Python
+website (http://www.python.org). A current "universal binary" build of Python,
+which runs natively on the Mac's new Intel and legacy PPC CPU's, is available
+there.
What you get after installing is a number of things:
-* A :file:`MacPython 2.5` folder in your :file:`Applications` folder. In here
+* A :file:`MacPython 3.3` folder in your :file:`Applications` folder. In here
you find IDLE, the development environment that is a standard part of official
Python distributions; PythonLauncher, which handles double-clicking Python
scripts from the Finder; and the "Build Applet" tool, which allows you to
@@ -92,7 +93,7 @@
anything that has a GUI) need to be run in a special way. Use :program:`pythonw`
instead of :program:`python` to start such scripts.
-With Python 2.5, you can use either :program:`python` or :program:`pythonw`.
+With Python 3.3, you can use either :program:`python` or :program:`pythonw`.
Configuration
@@ -125,13 +126,11 @@
There are several methods to install additional Python packages:
-* http://pythonmac.org/packages/ contains selected compiled packages for Python
- 2.5, 2.4, and 2.3.
-
* Packages can be installed via the standard Python distutils mode (``python
setup.py install``).
-* Many packages can also be installed via the :program:`setuptools` extension.
+* Many packages can also be installed via the :program:`setuptools` extension
+ or :program:`pip` wrapper, see http://www.pip-installer.org/.
GUI Programming on the Mac
@@ -159,7 +158,7 @@
Distributing Python Applications on the Mac
===========================================
-The "Build Applet" tool that is placed in the MacPython 2.5 folder is fine for
+The "Build Applet" tool that is placed in the MacPython 3.3 folder is fine for
packaging small Python scripts on your own machine to run as a standard Mac
application. This tool, however, is not robust enough to distribute Python
applications to other users.