summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/collections.rst3
-rw-r--r--Doc/library/math.rst4
-rw-r--r--Doc/library/stdtypes.rst28
-rw-r--r--Doc/library/tokenize.rst10
4 files changed, 31 insertions, 14 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 5035ac9..3203ca5 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -519,6 +519,9 @@ Example:
if kwds:
raise ValueError('Got unexpected field names: %r' % kwds.keys())
return result
+ <BLANKLINE>
+ def __getnewargs__(self):
+ return tuple(self)
<BLANKLINE>
x = property(itemgetter(0))
y = property(itemgetter(1))
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index 0868e8e..aba6b0e 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -41,6 +41,10 @@ Number-theoretic and representation functions:
Return the absolute value of *x*.
+.. function:: factorial(x)
+
+ Return *x* factorial. Raises :exc:`ValueError` if *x* is not intergral or
+ is negative.
.. function:: floor(x)
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 09549ad..27c3fb4 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1501,16 +1501,22 @@ The constructors for both classes work the same:
Test whether the set is a true superset of *other*, that is, ``set >=
other and set != other``.
- .. method:: union(other)
- set | other
+ .. method:: union(other, ...)
+ set | other | ...
Return a new set with elements from both sets.
- .. method:: intersection(other)
- set & other
+ .. versionchanged:: 2.6
+ Accepts multiple input iterables.
+
+ .. method:: intersection(other, ...)
+ set & other & ...
Return a new set with elements common to both sets.
+ .. versionchanged:: 2.6
+ Accepts multiple input iterables.
+
.. method:: difference(other)
set - other
@@ -1562,16 +1568,22 @@ The constructors for both classes work the same:
The following table lists operations available for :class:`set` that do not
apply to immutable instances of :class:`frozenset`:
- .. method:: update(other)
- set |= other
+ .. method:: update(other, ...)
+ set |= other | ...
Update the set, adding elements from *other*.
- .. method:: intersection_update(other)
- set &= other
+ .. versionchanged:: 2.6
+ Accepts multiple input iterables.
+
+ .. method:: intersection_update(other, ...)
+ set &= other & ...
Update the set, keeping only elements found in it and *other*.
+ .. versionchanged:: 2.6
+ Accepts multiple input iterables.
+
.. method:: difference_update(other)
set -= other
diff --git a/Doc/library/tokenize.rst b/Doc/library/tokenize.rst
index bbe73d0..b2caded 100644
--- a/Doc/library/tokenize.rst
+++ b/Doc/library/tokenize.rst
@@ -1,4 +1,3 @@
-
:mod:`tokenize` --- Tokenizer for Python source
===============================================
@@ -15,7 +14,6 @@ colorizers for on-screen displays.
The primary entry point is a :term:`generator`:
-
.. function:: tokenize(readline)
The :func:`tokenize` generator requires one argument, *readline*, which
@@ -28,11 +26,11 @@ The primary entry point is a :term:`generator`:
token string; a 2-tuple ``(srow, scol)`` of ints specifying the row and
column where the token begins in the source; a 2-tuple ``(erow, ecol)`` of
ints specifying the row and column where the token ends in the source; and
- the line on which the token was found. The line passed is the *logical*
- line; continuation lines are included.
+ the line on which the token was found. The line passed (the last tuple item)
+ is the *logical* line; continuation lines are included.
- tokenize determines the source encoding of the file by looking for a utf-8
- bom or encoding cookie, according to :pep:`263`.
+ :func:`tokenize` determines the source encoding of the file by looking for a
+ UTF-8 BOM or encoding cookie, according to :pep:`263`.
All constants from the :mod:`token` module are also exported from