Merged revisions 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,60505-60506,60508-60509,60523-60524,60532,60543,60545,60547-60548,60552,60554,60556-60559,60561-60562,60569,60571-60572,60574,60576-60583,60585-60586,60589,60591,60594-60595,60597-60598,60600-60601,60606-60612,60615,60617,60619-60621,60623-60625,60627-60629,60631,60633,60635,60647,60650,60652,60654,60656,60658-60659,60664-60666,60668-60670,60672,60676,60678,60680-60683,60685-60686,60688,60690,60692-60694,60697-60700,60705-60706,60708,60711,60714,60720,60724-60730,60732,60736,60742,60744,60746,60748,60750-60751,60753,60756-60757,60759-60761,60763-60764,60766,60769-60770,60774-60784,60787-60789,60793,60796,60799-60809,60812-60813,60815-60821,60823-60826,60828-60829,60831-60834,60836,60838-60839,60846-60849,60852-60854,60856-60859,60861-60870,60874-60875,60880-60881,60886,60888-60890,60892,60894-60898,60900-60931,60933-60958 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r60901 | eric.smith | 2008-02-19 14:21:56 +0100 (Tue, 19 Feb 2008) | 1 line
Added PEP 3101.
........
r60907 | georg.brandl | 2008-02-20 20:12:36 +0100 (Wed, 20 Feb 2008) | 2 lines
Fixes contributed by Ori Avtalion.
........
r60909 | eric.smith | 2008-02-21 00:34:22 +0100 (Thu, 21 Feb 2008) | 1 line
Trim leading zeros from a floating point exponent, per C99. See issue 1600. As far as I know, this only affects Windows. Add float type 'n' to PyOS_ascii_formatd (see PEP 3101 for 'n' description).
........
r60910 | eric.smith | 2008-02-21 00:39:28 +0100 (Thu, 21 Feb 2008) | 1 line
Now that PyOS_ascii_formatd supports the 'n' format, simplify the float formatting code to just call it.
........
r60918 | andrew.kuchling | 2008-02-21 15:23:38 +0100 (Thu, 21 Feb 2008) | 2 lines
Close manifest file.
This change doesn't make any difference to CPython, but is a necessary fix for Jython.
........
r60921 | guido.van.rossum | 2008-02-21 18:46:16 +0100 (Thu, 21 Feb 2008) | 2 lines
Remove news about float repr() -- issue 1580 is still in limbo.
........
r60923 | guido.van.rossum | 2008-02-21 19:18:37 +0100 (Thu, 21 Feb 2008) | 5 lines
Removed uses of dict.has_key() from distutils, and uses of
callable() from copy_reg.py, so the interpreter now starts up
without warnings when '-3' is given. More work like this needs to
be done in the rest of the stdlib.
........
r60924 | thomas.heller | 2008-02-21 19:28:48 +0100 (Thu, 21 Feb 2008) | 4 lines
configure.ac: Remove the configure check for _Bool, it is already done in the
top-level Python configure script.
configure, fficonfig.h.in: regenerated.
........
r60925 | thomas.heller | 2008-02-21 19:52:20 +0100 (Thu, 21 Feb 2008) | 3 lines
Replace 'has_key()' with 'in'.
Replace 'raise Error, stuff' with 'raise Error(stuff)'.
........
r60927 | raymond.hettinger | 2008-02-21 20:24:53 +0100 (Thu, 21 Feb 2008) | 1 line
Update more instances of has_key().
........
r60928 | guido.van.rossum | 2008-02-21 20:46:35 +0100 (Thu, 21 Feb 2008) | 3 lines
Fix a few typos and layout glitches (more work is needed).
Move 2.5 news to Misc/HISTORY.
........
r60936 | georg.brandl | 2008-02-21 21:33:38 +0100 (Thu, 21 Feb 2008) | 2 lines
#2079: typo in userdict docs.
........
r60938 | georg.brandl | 2008-02-21 21:38:13 +0100 (Thu, 21 Feb 2008) | 2 lines
Part of #2154: minimal syntax fixes in doc example snippets.
........
r60942 | raymond.hettinger | 2008-02-22 04:16:42 +0100 (Fri, 22 Feb 2008) | 1 line
First draft for itertools.product(). Docs and other updates forthcoming.
........
r60955 | nick.coghlan | 2008-02-22 11:54:06 +0100 (Fri, 22 Feb 2008) | 1 line
Try to make command line error messages from runpy easier to understand (and suppress traceback cruft from the implicitly invoked runpy machinery)
........
r60956 | georg.brandl | 2008-02-22 13:31:45 +0100 (Fri, 22 Feb 2008) | 2 lines
A lot more typo fixes by Ori Avtalion.
........
r60957 | georg.brandl | 2008-02-22 13:56:34 +0100 (Fri, 22 Feb 2008) | 2 lines
Don't reference pyshell.
........
r60958 | georg.brandl | 2008-02-22 13:57:05 +0100 (Fri, 22 Feb 2008) | 2 lines
Another fix.
........
diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst
index 421ec15..d83a8fe 100644
--- a/Doc/c-api/long.rst
+++ b/Doc/c-api/long.rst
@@ -190,7 +190,7 @@
.. cfunction:: void* PyLong_AsVoidPtr(PyObject *pylong)
- Convert a Python integer *pylong* to a C :ctype:`void` pointer. If *pylong*
- cannot be converted, an :exc:`OverflowError` will be raised. This is only
- assured to produce a usable :ctype:`void` pointer for values created with
- :cfunc:`PyLong_FromVoidPtr`.
+ Convert a Python integer *pylong* to a C :ctype:`void` pointer.
+ If *pylong* cannot be converted, an :exc:`OverflowError` will be raised. This
+ is only assured to produce a usable :ctype:`void` pointer for values created
+ with :cfunc:`PyLong_FromVoidPtr`.
diff --git a/Doc/c-api/objbuffer.rst b/Doc/c-api/objbuffer.rst
index 2ce0d97..3c5dc99 100644
--- a/Doc/c-api/objbuffer.rst
+++ b/Doc/c-api/objbuffer.rst
@@ -8,7 +8,7 @@
.. cfunction:: int PyObject_AsCharBuffer(PyObject *obj, const char **buffer, Py_ssize_t *buffer_len)
- Returns a pointer to a read-only memory location useable as character- based
+ Returns a pointer to a read-only memory location usable as character-based
input. The *obj* argument must support the single-segment character buffer
interface. On success, returns ``0``, sets *buffer* to the memory location and
*buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:`TypeError`
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
index f1a8233..03cb1b3 100644
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -560,7 +560,7 @@
The :attr:`tp_traverse` pointer is used by the garbage collector to detect
reference cycles. A typical implementation of a :attr:`tp_traverse` function
simply calls :cfunc:`Py_VISIT` on each of the instance's members that are Python
- objects. For exampe, this is function :cfunc:`local_traverse` from the
+ objects. For example, this is function :cfunc:`local_traverse` from the
:mod:`thread` extension module::
static int
diff --git a/Doc/distutils/builtdist.rst b/Doc/distutils/builtdist.rst
index f6c28d3..2ebc986 100644
--- a/Doc/distutils/builtdist.rst
+++ b/Doc/distutils/builtdist.rst
@@ -195,7 +195,7 @@
| | or --- & :option:`maintainer` and |
| | :option:`maintainer_email` |
+------------------------------------------+----------------------------------------------+
-| Copyright | :option:`licence` |
+| Copyright | :option:`license` |
+------------------------------------------+----------------------------------------------+
| Url | :option:`url` |
+------------------------------------------+----------------------------------------------+
diff --git a/Doc/distutils/packageindex.rst b/Doc/distutils/packageindex.rst
index f0f886b..8242012 100644
--- a/Doc/distutils/packageindex.rst
+++ b/Doc/distutils/packageindex.rst
@@ -53,13 +53,13 @@
The .pypirc file
================
-The format of the :file:`.pypirc` file is formated as follows::
+The format of the :file:`.pypirc` file is as follows::
[server-login]
repository: <repository-url>
username: <username>
password: <password>
-*repository* can be ommitted and defaults to ``http://www.python.org/pypi``.
+*repository* can be omitted and defaults to ``http://www.python.org/pypi``.
diff --git a/Doc/distutils/setupscript.rst b/Doc/distutils/setupscript.rst
index 8b88b58..7c65821 100644
--- a/Doc/distutils/setupscript.rst
+++ b/Doc/distutils/setupscript.rst
@@ -185,7 +185,7 @@
same base package), use the :option:`ext_package` keyword argument to
:func:`setup`. For example, ::
- setup(...
+ setup(...,
ext_package='pkg',
ext_modules=[Extension('foo', ['foo.c']),
Extension('subpkg.bar', ['bar.c'])],
@@ -214,7 +214,7 @@
This warning notwithstanding, options to SWIG can be currently passed like
this::
- setup(...
+ setup(...,
ext_modules=[Extension('_foo', ['foo.i'],
swig_opts=['-modern', '-I../include'])],
py_modules=['foo'],
@@ -443,7 +443,7 @@
The :option:`scripts` option simply is a list of files to be handled in this
way. From the PyXML setup script::
- setup(...
+ setup(...,
scripts=['scripts/xmlproc_parse', 'scripts/xmlproc_val']
)
@@ -499,7 +499,7 @@
:option:`data_files` specifies a sequence of (*directory*, *files*) pairs in the
following way::
- setup(...
+ setup(...,
data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2.gif']),
('config', ['cfg/data.cfg']),
('/etc/init.d', ['init-script'])]
@@ -611,7 +611,7 @@
:option:`classifiers` are specified in a python list::
- setup(...
+ setup(...,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
diff --git a/Doc/howto/advocacy.rst b/Doc/howto/advocacy.rst
index 407bf9f..8b5b11c 100644
--- a/Doc/howto/advocacy.rst
+++ b/Doc/howto/advocacy.rst
@@ -276,7 +276,7 @@
product in any way.
* If something goes wrong, you can't sue for damages. Practically all software
- licences contain this condition.
+ licenses contain this condition.
Notice that you don't have to provide source code for anything that contains
Python or is built with it. Also, the Python interpreter and accompanying
diff --git a/Doc/howto/doanddont.rst b/Doc/howto/doanddont.rst
index 9e8a052..d263df3 100644
--- a/Doc/howto/doanddont.rst
+++ b/Doc/howto/doanddont.rst
@@ -81,7 +81,7 @@
This is a "don't" which is much weaker then the previous "don't"s but is still
something you should not do if you don't have good reasons to do that. The
reason it is usually bad idea is because you suddenly have an object which lives
-in two seperate namespaces. When the binding in one namespace changes, the
+in two separate namespaces. When the binding in one namespace changes, the
binding in the other will not, so there will be a discrepancy between them. This
happens when, for example, one module is reloaded, or changes the definition of
a function at runtime.
diff --git a/Doc/howto/functional.rst b/Doc/howto/functional.rst
index e62d224..e7b23b7 100644
--- a/Doc/howto/functional.rst
+++ b/Doc/howto/functional.rst
@@ -892,7 +892,7 @@
itertools.izip(['a', 'b', 'c'], (1, 2, 3)) =>
('a', 1), ('b', 2), ('c', 3)
-It's similiar to the built-in :func:`zip` function, but doesn't construct an
+It's similar to the built-in :func:`zip` function, but doesn't construct an
in-memory list and exhaust all the input iterators before returning; instead
tuples are constructed and returned only if they're requested. (The technical
term for this behaviour is `lazy evaluation
diff --git a/Doc/howto/sockets.rst b/Doc/howto/sockets.rst
index fa72882..c4d0961 100644
--- a/Doc/howto/sockets.rst
+++ b/Doc/howto/sockets.rst
@@ -354,7 +354,7 @@
reason to do otherwise.
In return, you will get three lists. They have the sockets that are actually
-readable, writable and in error. Each of these lists is a subset (possbily
+readable, writable and in error. Each of these lists is a subset (possibly
empty) of the corresponding list you passed in. And if you put a socket in more
than one input list, it will only be (at most) in one output list.
@@ -368,7 +368,7 @@
If you have a "server" socket, put it in the potential_readers list. If it comes
out in the readable list, your ``accept`` will (almost certainly) work. If you
have created a new socket to ``connect`` to someone else, put it in the
-ptoential_writers list. If it shows up in the writable list, you have a decent
+potential_writers list. If it shows up in the writable list, you have a decent
chance that it has connected.
One very nasty problem with ``select``: if somewhere in those input lists of
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index 1491213..f00c873 100644
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -1018,7 +1018,7 @@
+-----------------+--------------------------------+--------------------------------+
| iso8859_3 | iso-8859-3, latin3, L3 | Esperanto, Maltese |
+-----------------+--------------------------------+--------------------------------+
-| iso8859_4 | iso-8859-4, latin4, L4 | Baltic languagues |
+| iso8859_4 | iso-8859-4, latin4, L4 | Baltic languages |
+-----------------+--------------------------------+--------------------------------+
| iso8859_5 | iso-8859-5, cyrillic | Bulgarian, Byelorussian, |
| | | Macedonian, Russian, Serbian |
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 1d6687d..55b6f37 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -452,7 +452,7 @@
.. function:: namedtuple(typename, fieldnames, [verbose])
Returns a new tuple subclass named *typename*. The new subclass is used to
- create tuple-like objects that have fields accessable by attribute lookup as
+ create tuple-like objects that have fields accessible by attribute lookup as
well as being indexable and iterable. Instances of the subclass also have a
helpful docstring (with typename and fieldnames) and a helpful :meth:`__repr__`
method which lists the tuple contents in a ``name=value`` format.
@@ -516,7 +516,7 @@
>>> x, y = p # unpack like a regular tuple
>>> x, y
(11, 22)
- >>> p.x + p.y # fields also accessable by name
+ >>> p.x + p.y # fields also accessible by name
33
>>> p # readable __repr__ with a name=value style
Point(x=11, y=22)
@@ -708,7 +708,7 @@
in that case.
:class:`UserString` objects
--------------------------
+---------------------------
The class, :class:`UserString` acts as a wrapper around string objects.
The need for this class has been partially supplanted by the ability to
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst
index b0845e9..ac21b57 100644
--- a/Doc/library/decimal.rst
+++ b/Doc/library/decimal.rst
@@ -1557,7 +1557,7 @@
original's two-place significance.
If an application does not care about tracking significance, it is easy to
-remove the exponent and trailing zeroes, losing signficance, but keeping the
+remove the exponent and trailing zeroes, losing significance, but keeping the
value unchanged::
>>> def remove_exponent(d):
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index f466df1..27f6189 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -41,7 +41,7 @@
It is, of course, possible to log messages with different verbosity levels or to
different destinations. Support for writing log messages to files, HTTP
GET/POST locations, email via SMTP, generic sockets, or OS-specific logging
-mechnisms are all supported by the standard module. You can also create your
+mechanisms are all supported by the standard module. You can also create your
own log destination class if you have special requirements not met by any of the
built-in classes.
@@ -265,7 +265,7 @@
with an :func:`addHandler` method. As an example scenario, an application may
want to send all log messages to a log file, all log messages of error or higher
to stdout, and all messages of critical to an email address. This scenario
-requires three individual handlers where each hander is responsible for sending
+requires three individual handlers where each handler is responsible for sending
messages of a specific severity to a specific location.
The standard library includes quite a few handler types; this tutorial uses only
diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst
index d81897c..e05f44a 100644
--- a/Doc/library/mailbox.rst
+++ b/Doc/library/mailbox.rst
@@ -432,7 +432,7 @@
original format, which is sometimes referred to as :dfn:`mboxo`. This means that
the :mailheader:`Content-Length` header, if present, is ignored and that any
occurrences of "From " at the beginning of a line in a message body are
-transformed to ">From " when storing the message, although occurences of ">From
+transformed to ">From " when storing the message, although occurrences of ">From
" are not transformed to "From " when reading the message.
Some :class:`Mailbox` methods implemented by :class:`mbox` deserve special
@@ -580,7 +580,7 @@
.. method:: MH.close()
- :class:`MH` instances do not keep any open files, so this method is equivelant
+ :class:`MH` instances do not keep any open files, so this method is equivalent
to :meth:`unlock`.
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index 1b1b8ba..7903ae8 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -1629,7 +1629,7 @@
value.append(arg)
del rargs[0]
- setattr(parser.values, option.dest, value)
+ setattr(parser.values, option.dest, value)
[...]
parser.add_option("-c", "--callback",
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst
index cddaa58..bb1e672 100644
--- a/Doc/library/platform.rst
+++ b/Doc/library/platform.rst
@@ -237,7 +237,7 @@
version)`` which default to the given parameters in case the lookup fails.
Note that this function has intimate knowledge of how different libc versions
- add symbols to the executable is probably only useable for executables compiled
+ add symbols to the executable is probably only usable for executables compiled
using :program:`gcc`.
The file is read and scanned in chunks of *chunksize* bytes.
diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst
index fe3cadf..2d46033 100644
--- a/Doc/library/profile.rst
+++ b/Doc/library/profile.rst
@@ -513,7 +513,7 @@
non-parenthesized number repeats the cumulative time spent in the function
at the right.
- * With :mod:`cProfile`, each caller is preceeded by three numbers: the number of
+ * With :mod:`cProfile`, each caller is preceded by three numbers: the number of
times this specific call was made, and the total and cumulative times spent in
the current function while it was invoked by this specific caller.
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index f08192d..c9e703c 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -68,6 +68,17 @@
the time :func:`setstate` was called.
+.. function:: jumpahead(n)
+
+ Change the internal state to one different from and likely far away from the
+ current state. *n* is a non-negative integer which is used to scramble the
+ current state vector. This is most useful in multi-threaded programs, in
+ conjunction with multiple instances of the :class:`Random` class:
+ :meth:`setstate` or :meth:`seed` can be used to force all instances into the
+ same internal state, and then :meth:`jumpahead` can be used to force the
+ instances' states far apart.
+
+
.. function:: getrandbits(k)
Returns a python integer with *k* random bits. This method is supplied with
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index 0c64c72..852511c 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -1089,7 +1089,7 @@
'Heather Albrecht 548.326.4584 919 Park Place']
Finally, split each entry into a list with first name, last name, telephone
-number, and address. We use the ``maxsplit`` paramater of :func:`split`
+number, and address. We use the ``maxsplit`` parameter of :func:`split`
because the address has spaces, our splitting pattern, in it::
>>> [re.split(":? ", entry, 3) for entry in entries]
@@ -1099,7 +1099,7 @@
['Heather', 'Albrecht', '548.326.4584', '919 Park Place']]
The ``:?`` pattern matches the colon after the last name, so that it does not
-occur in the result list. With a ``maxsplit`` of ``4``, we could seperate the
+occur in the result list. With a ``maxsplit`` of ``4``, we could separate the
house number from the street name::
>>> [re.split(":? ", entry, 4) for entry in entries]
@@ -1131,7 +1131,7 @@
Finding all Adverbs
^^^^^^^^^^^^^^^^^^^
-:func:`findall` matches *all* occurences of a pattern, not just the first
+:func:`findall` matches *all* occurrences of a pattern, not just the first
one as :func:`search` does. For example, if one was a writer and wanted to
find all of the adverbs in some text, he or she might use :func:`findall` in
the following manner::
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index cb1b87c..971e316 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -886,5 +886,5 @@
# receive a package
print s.recvfrom(65565)
- # disabled promiscous mode
+ # disabled promiscuous mode
s.ioctl(socket.SIO_RCVALL, socket.RCVALL_OFF)
diff --git a/Doc/library/tokenize.rst b/Doc/library/tokenize.rst
index 19a5a35..9a17b14 100644
--- a/Doc/library/tokenize.rst
+++ b/Doc/library/tokenize.rst
@@ -18,7 +18,7 @@
.. function:: generate_tokens(readline)
- The :func:`generate_tokens` generator requires one argment, *readline*, which
+ The :func:`generate_tokens` generator requires one argument, *readline*, which
must be a callable object which provides the same interface as the
:meth:`readline` method of built-in file objects (see section
:ref:`bltin-file-objects`). Each call to the function should return one line of
diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst
index 195ac95..83e6000 100644
--- a/Doc/library/weakref.rst
+++ b/Doc/library/weakref.rst
@@ -61,7 +61,7 @@
class Dict(dict):
pass
- obj = Dict(red=1, green=2, blue=3) # this object is weak referencable
+ obj = Dict(red=1, green=2, blue=3) # this object is weak referenceable
Extension types can easily be made to support weak references; see
:ref:`weakref-support`.
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst
index 44c82e0..5590476 100644
--- a/Doc/library/xml.etree.elementtree.rst
+++ b/Doc/library/xml.etree.elementtree.rst
@@ -421,7 +421,7 @@
.. method:: TreeBuilder.close()
- Flushes the parser buffers, and returns the toplevel documen element. Returns an
+ Flushes the parser buffers, and returns the toplevel document element. Returns an
Element instance.
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
index ffd7423..74833df 100644
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -589,7 +589,7 @@
.. rubric:: Footnotes
-.. [#] The exception is propogated to the invocation stack only if there is no
+.. [#] The exception is propagated to the invocation stack only if there is no
:keyword:`finally` clause that negates the exception.
.. [#] Currently, control "flows off the end" except in the case of an exception or the
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index 380d265..e8efa9f 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -380,7 +380,7 @@
generator, or raises :exc:`StopIteration` if the generator exits without
yielding another value. When :meth:`send` is called to start the generator,
it must be called with :const:`None` as the argument, because there is no
- :keyword:`yield` expression that could receieve the value.
+ :keyword:`yield` expression that could receive the value.
.. method:: generator.throw(type[, value[, traceback]])
@@ -652,7 +652,7 @@
If the syntax ``*expression`` appears in the function call, ``expression`` must
evaluate to a sequence. Elements from this sequence are treated as if they were
-additional positional arguments; if there are postional arguments *x1*,...,*xN*
+additional positional arguments; if there are positional arguments *x1*,...,*xN*
, and ``expression`` evaluates to a sequence *y1*,...,*yM*, this is equivalent
to a call with M+N positional arguments *x1*,...,*xN*,*y1*,...,*yM*.
diff --git a/Doc/reference/index.rst b/Doc/reference/index.rst
index a179d21..18bf053 100644
--- a/Doc/reference/index.rst
+++ b/Doc/reference/index.rst
@@ -17,7 +17,7 @@
interfaces available to C/C++ programmers in detail.
.. toctree::
- :maxdepth: 3
+ :maxdepth: 2
introduction.rst
lexical_analysis.rst
diff --git a/Doc/tutorial/stdlib2.rst b/Doc/tutorial/stdlib2.rst
index bab0114..c6b6620 100644
--- a/Doc/tutorial/stdlib2.rst
+++ b/Doc/tutorial/stdlib2.rst
@@ -269,7 +269,7 @@
0
>>> d['primary'] # entry was automatically removed
Traceback (most recent call last):
- File "<pyshell#108>", line 1, in -toplevel-
+ File "<stdin>", line 1, in <module>
d['primary'] # entry was automatically removed
File "C:/python30/lib/weakref.py", line 46, in __getitem__
o = self.data[key]()
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index dae9b09..3f89c03 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -560,7 +560,7 @@
Numbers are further divided into :class:`Exact` and :class:`Inexact`.
Exact numbers can represent values precisely and operations never
round off the results or introduce tiny errors that may break the
-communtativity and associativity properties; inexact numbers may
+commutativity and associativity properties; inexact numbers may
perform such rounding or introduce small errors. Integers, long
integers, and rational numbers are exact, while floating-point
and complex numbers are inexact.
@@ -707,8 +707,10 @@
Other functions in the :mod:`math` module, :func:`isinf` and
:func:`isnan`, return true if their floating-point argument is
- infinite or Not A Number.
+ infinite or Not A Number.
+
.. Patch 1640
+
The ``math.copysign(x, y)`` function
copies the sign bit of an IEEE 754 number, returning the absolute
value of *x* combined with the sign bit of *y*. For example,
@@ -1078,7 +1080,7 @@
* Integrating signal handling with GUI handling event loops
like those used by Tkinter or GTk+ has long been a problem; most
- software ends up polling, waking up every fraction of a second. Thi
+ software ends up polling, waking up every fraction of a second.
The :mod:`signal` module can now make this more efficient.
Calling ``signal.set_wakeup_fd(fd)`` sets a file descriptor
to be used; when a signal is received, a byte is written to that
@@ -1293,7 +1295,8 @@
z.extractall()
(Contributed by Alan McIntyre.)
- .. % Patch 467924
+
+ .. Patch 467924
.. ======================================================================
.. whole new modules get described in subsections here
@@ -1392,7 +1395,7 @@
.. Issue 1534
* Python's C API now includes two functions for case-insensitive string
- comparisions, ``PyOS_stricmp(char*, char*)``
+ comparisons, ``PyOS_stricmp(char*, char*)``
and ``PyOS_strnicmp(char*, char*, Py_ssize_t)``.
(Contributed by Christian Heimes.)