Commit 3b85b9b4 authored by Georg Brandl's avatar Georg Brandl

Merged revisions...

Merged revisions 85843,85849-85850,85867,85907,85914,86134,86187,86315-86316,86390,86424-86425,86428 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85843 | georg.brandl | 2010-10-26 08:59:23 +0200 (Di, 26 Okt 2010) | 1 line

  Markup fix.
........
  r85849 | georg.brandl | 2010-10-26 21:31:06 +0200 (Di, 26 Okt 2010) | 1 line

  #10200: typo.
........
  r85850 | georg.brandl | 2010-10-26 21:58:11 +0200 (Di, 26 Okt 2010) | 1 line

  #10200: typo.
........
  r85867 | georg.brandl | 2010-10-27 22:01:51 +0200 (Mi, 27 Okt 2010) | 1 line

  Add David.
........
  r85907 | georg.brandl | 2010-10-29 06:54:13 +0200 (Fr, 29 Okt 2010) | 1 line

  #10222: fix for overzealous AIX compiler.
........
  r85914 | georg.brandl | 2010-10-29 08:17:38 +0200 (Fr, 29 Okt 2010) | 1 line

  (?:...) is a non-capturing, but still grouping construct.
........
  r86134 | georg.brandl | 2010-11-03 08:41:00 +0100 (Mi, 03 Nov 2010) | 1 line

  A newline in lineno output breaks pyframe output.
........
  r86187 | georg.brandl | 2010-11-05 08:10:41 +0100 (Fr, 05 Nov 2010) | 1 line

  Move glossary entry to the right position and fix link.
........
  r86315 | georg.brandl | 2010-11-08 12:05:18 +0100 (Mo, 08 Nov 2010) | 1 line

  Fix latex conversion glitch in property/feature descriptions.
........
  r86316 | georg.brandl | 2010-11-08 12:08:35 +0100 (Mo, 08 Nov 2010) | 1 line

  Fix typo.
........
  r86390 | georg.brandl | 2010-11-10 08:57:10 +0100 (Mi, 10 Nov 2010) | 1 line

  Fix typo.
........
  r86424 | georg.brandl | 2010-11-12 07:19:48 +0100 (Fr, 12 Nov 2010) | 1 line

  Build a PDF of the FAQs too.
........
  r86425 | georg.brandl | 2010-11-12 07:20:12 +0100 (Fr, 12 Nov 2010) | 1 line

  #10008: Fix duplicate index entry.
........
  r86428 | georg.brandl | 2010-11-12 09:09:26 +0100 (Fr, 12 Nov 2010) | 1 line

  Fix weird line block in table.
........
parent 8b63b9bb
...@@ -126,6 +126,8 @@ latex_documents = [ ...@@ -126,6 +126,8 @@ latex_documents = [
'Python Tutorial', _stdauthor, 'manual'), 'Python Tutorial', _stdauthor, 'manual'),
('using/index', 'using.tex', ('using/index', 'using.tex',
'Python Setup and Usage', _stdauthor, 'manual'), 'Python Setup and Usage', _stdauthor, 'manual'),
('faq/index', 'faq.tex',
'Python Frequently Asked Questions', _stdauthor, 'manual'),
('whatsnew/' + version, 'whatsnew.tex', ('whatsnew/' + version, 'whatsnew.tex',
'What\'s New in Python', 'A. M. Kuchling', 'howto'), 'What\'s New in Python', 'A. M. Kuchling', 'howto'),
] ]
......
...@@ -356,6 +356,26 @@ Glossary ...@@ -356,6 +356,26 @@ Glossary
More information can be found in :ref:`typeiter`. More information can be found in :ref:`typeiter`.
key function
A key function or collation function is a callable that returns a value
used for sorting or ordering. For example, :func:`locale.strxfrm` is
used to produce a sort key that is aware of locale specific sort
conventions.
A number of tools in Python accept key functions to control how elements
are ordered or grouped. They include :func:`min`, :func:`max`,
:func:`sorted`, :meth:`list.sort`, :func:`heapq.nsmallest`,
:func:`heapq.nlargest`, and :func:`itertools.groupby`.
There are several ways to create a key function. For example. the
:meth:`str.lower` method can serve as a key function for case insensitive
sorts. Alternatively, an ad-hoc key function can be built from a
:keyword:`lambda` expression such as ``lambda r: (r[0], r[2])``. Also,
the :mod:`operator` module provides three key function constuctors:
:func:`~operator.attrgetter`, :func:`~operator.itemgetter`, and
:func:`~operator.methodcaller`. See the :ref:`Sorting HOW TO
<sortinghowto>` for examples of how to create and use key functions.
keyword argument keyword argument
Arguments which are preceded with a ``variable_name=`` in the call. Arguments which are preceded with a ``variable_name=`` in the call.
The variable name designates the local name in the function to which the The variable name designates the local name in the function to which the
...@@ -379,7 +399,7 @@ Glossary ...@@ -379,7 +399,7 @@ Glossary
:keyword:`lambda` expression such as ``lambda r: (r[0], r[2])``. Also, :keyword:`lambda` expression such as ``lambda r: (r[0], r[2])``. Also,
the :mod:`operator` module provides three key function constuctors: the :mod:`operator` module provides three key function constuctors:
:func:`~operator.attrgetter`, :func:`~operator.itemgetter`, and :func:`~operator.attrgetter`, :func:`~operator.itemgetter`, and
:func:`~operator.methodcaller`. See the :ref:`sorting-howto` for :func:`~operator.methodcaller`. See the :ref:`sortinghowto` for
examples of how to create and use key functions. examples of how to create and use key functions.
lambda lambda
......
.. _sorting-howto: .. _sortinghowto:
Sorting HOW TO Sorting HOW TO
************** **************
......
...@@ -72,7 +72,6 @@ Iterator Arguments Resu ...@@ -72,7 +72,6 @@ Iterator Arguments Resu
:func:`permutations` p[, r] r-length tuples, all possible orderings, no repeated elements :func:`permutations` p[, r] r-length tuples, all possible orderings, no repeated elements
:func:`combinations` p, r r-length tuples, in sorted order, no repeated elements :func:`combinations` p, r r-length tuples, in sorted order, no repeated elements
:func:`combinations_with_replacement` p, r r-length tuples, in sorted order, with repeated elements :func:`combinations_with_replacement` p, r r-length tuples, in sorted order, with repeated elements
|
``product('ABCD', repeat=2)`` ``AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD`` ``product('ABCD', repeat=2)`` ``AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD``
``permutations('ABCD', 2)`` ``AB AC AD BA BC BD CA CB CD DA DB DC`` ``permutations('ABCD', 2)`` ``AB AC AD BA BC BD CA CB CD DA DB DC``
``combinations('ABCD', 2)`` ``AB AC AD BC BD CD`` ``combinations('ABCD', 2)`` ``AB AC AD BC BD CD``
......
...@@ -554,7 +554,7 @@ catalogs, and the C library's search algorithms for locating message catalogs. ...@@ -554,7 +554,7 @@ catalogs, and the C library's search algorithms for locating message catalogs.
Python applications should normally find no need to invoke these functions, and Python applications should normally find no need to invoke these functions, and
should use :mod:`gettext` instead. A known exception to this rule are should use :mod:`gettext` instead. A known exception to this rule are
applications that link use additional C libraries which internally invoke applications that link with additional C libraries which internally invoke
:cfunc:`gettext` or :func:`dcgettext`. For these applications, it may be :cfunc:`gettext` or :func:`dcgettext`. For these applications, it may be
necessary to bind the text domain, so that the libraries can properly locate necessary to bind the text domain, so that the libraries can properly locate
their message catalogs. their message catalogs.
......
...@@ -224,7 +224,7 @@ The special characters are: ...@@ -224,7 +224,7 @@ The special characters are:
undefined. undefined.
``(?:...)`` ``(?:...)``
A non-grouping version of regular parentheses. Matches whatever regular A non-capturing version of regular parentheses. Matches whatever regular
expression is inside the parentheses, but the substring matched by the group expression is inside the parentheses, but the substring matched by the group
*cannot* be retrieved after performing a match or referenced later in the *cannot* be retrieved after performing a match or referenced later in the
pattern. pattern.
......
...@@ -146,7 +146,7 @@ string formatting behaviors using the same implementation as the built-in ...@@ -146,7 +146,7 @@ string formatting behaviors using the same implementation as the built-in
Loop over the format_string and return an iterable of tuples Loop over the format_string and return an iterable of tuples
(*literal_text*, *field_name*, *format_spec*, *conversion*). This is used (*literal_text*, *field_name*, *format_spec*, *conversion*). This is used
by :meth:`vformat` to break the string in to either literal text, or by :meth:`vformat` to break the string into either literal text, or
replacement fields. replacement fields.
The values in the tuple conceptually represent a span of literal text The values in the tuple conceptually represent a span of literal text
......
...@@ -164,7 +164,7 @@ the command-line options passed to :option:`-W` and calls to ...@@ -164,7 +164,7 @@ the command-line options passed to :option:`-W` and calls to
* :exc:`BytesWarning` is ignored unless the :option:`-b` option is given once or * :exc:`BytesWarning` is ignored unless the :option:`-b` option is given once or
twice; in this case this warning is either printed (``-b``) or turned into an twice; in this case this warning is either printed (``-b``) or turned into an
exception (``-bb`). exception (``-bb``).
.. versionchanged:: 3.2 .. versionchanged:: 3.2
:exc:`DeprecationWarning` is now ignored by default in addition to :exc:`DeprecationWarning` is now ignored by default in addition to
......
...@@ -52,52 +52,57 @@ for the feature and property names. ...@@ -52,52 +52,57 @@ for the feature and property names.
.. data:: feature_namespaces .. data:: feature_namespaces
Value: ``"http://xml.org/sax/features/namespaces"`` --- true: Perform Namespace | value: ``"http://xml.org/sax/features/namespaces"``
processing. --- false: Optionally do not perform Namespace processing (implies | true: Perform Namespace processing.
namespace-prefixes; default). --- access: (parsing) read-only; (not parsing) | false: Optionally do not perform Namespace processing (implies
read/write namespace-prefixes; default).
| access: (parsing) read-only; (not parsing) read/write
.. data:: feature_namespace_prefixes .. data:: feature_namespace_prefixes
Value: ``"http://xml.org/sax/features/namespace-prefixes"`` --- true: Report | value: ``"http://xml.org/sax/features/namespace-prefixes"``
the original prefixed names and attributes used for Namespace | true: Report the original prefixed names and attributes used for Namespace
declarations. --- false: Do not report attributes used for Namespace declarations.
declarations, and optionally do not report original prefixed names | false: Do not report attributes used for Namespace declarations, and
(default). --- access: (parsing) read-only; (not parsing) read/write optionally do not report original prefixed names (default).
| access: (parsing) read-only; (not parsing) read/write
.. data:: feature_string_interning .. data:: feature_string_interning
Value: ``"http://xml.org/sax/features/string-interning"`` --- true: All element | value: ``"http://xml.org/sax/features/string-interning"``
names, prefixes, attribute names, Namespace URIs, and local names are interned | true: All element names, prefixes, attribute names, Namespace URIs, and
using the built-in intern function. --- false: Names are not necessarily local names are interned using the built-in intern function.
interned, although they may be (default). --- access: (parsing) read-only; (not | false: Names are not necessarily interned, although they may be (default).
parsing) read/write | access: (parsing) read-only; (not parsing) read/write
.. data:: feature_validation .. data:: feature_validation
Value: ``"http://xml.org/sax/features/validation"`` --- true: Report all | value: ``"http://xml.org/sax/features/validation"``
validation errors (implies external-general-entities and | true: Report all validation errors (implies external-general-entities and
external-parameter-entities). --- false: Do not report validation errors. --- external-parameter-entities).
access: (parsing) read-only; (not parsing) read/write | false: Do not report validation errors.
| access: (parsing) read-only; (not parsing) read/write
.. data:: feature_external_ges .. data:: feature_external_ges
Value: ``"http://xml.org/sax/features/external-general-entities"`` --- true: | value: ``"http://xml.org/sax/features/external-general-entities"``
Include all external general (text) entities. --- false: Do not include | true: Include all external general (text) entities.
external general entities. --- access: (parsing) read-only; (not parsing) | false: Do not include external general entities.
read/write | access: (parsing) read-only; (not parsing) read/write
.. data:: feature_external_pes .. data:: feature_external_pes
Value: ``"http://xml.org/sax/features/external-parameter-entities"`` --- true: | value: ``"http://xml.org/sax/features/external-parameter-entities"``
Include all external parameter entities, including the external DTD subset. --- | true: Include all external parameter entities, including the external DTD
false: Do not include any external parameter entities, even the external DTD subset.
subset. --- access: (parsing) read-only; (not parsing) read/write | false: Do not include any external parameter entities, even the external
DTD subset.
| access: (parsing) read-only; (not parsing) read/write
.. data:: all_features .. data:: all_features
...@@ -107,34 +112,38 @@ for the feature and property names. ...@@ -107,34 +112,38 @@ for the feature and property names.
.. data:: property_lexical_handler .. data:: property_lexical_handler
Value: ``"http://xml.org/sax/properties/lexical-handler"`` --- data type: | value: ``"http://xml.org/sax/properties/lexical-handler"``
xml.sax.sax2lib.LexicalHandler (not supported in Python 2) --- description: An | data type: xml.sax.sax2lib.LexicalHandler (not supported in Python 2)
optional extension handler for lexical events like comments. --- access: | description: An optional extension handler for lexical events like
read/write comments.
| access: read/write
.. data:: property_declaration_handler .. data:: property_declaration_handler
Value: ``"http://xml.org/sax/properties/declaration-handler"`` --- data type: | value: ``"http://xml.org/sax/properties/declaration-handler"``
xml.sax.sax2lib.DeclHandler (not supported in Python 2) --- description: An | data type: xml.sax.sax2lib.DeclHandler (not supported in Python 2)
optional extension handler for DTD-related events other than notations and | description: An optional extension handler for DTD-related events other
unparsed entities. --- access: read/write than notations and unparsed entities.
| access: read/write
.. data:: property_dom_node .. data:: property_dom_node
Value: ``"http://xml.org/sax/properties/dom-node"`` --- data type: | value: ``"http://xml.org/sax/properties/dom-node"``
org.w3c.dom.Node (not supported in Python 2) --- description: When parsing, | data type: org.w3c.dom.Node (not supported in Python 2)
the current DOM node being visited if this is a DOM iterator; when not parsing, | description: When parsing, the current DOM node being visited if this is
the root DOM node for iteration. --- access: (parsing) read-only; (not parsing) a DOM iterator; when not parsing, the root DOM node for iteration.
read/write | access: (parsing) read-only; (not parsing) read/write
.. data:: property_xml_string .. data:: property_xml_string
Value: ``"http://xml.org/sax/properties/xml-string"`` --- data type: String --- | value: ``"http://xml.org/sax/properties/xml-string"``
description: The literal string of characters that was the source for the | data type: String
current event. --- access: read-only | description: The literal string of characters that was the source for the
current event.
| access: read-only
.. data:: all_properties .. data:: all_properties
......
...@@ -39,6 +39,7 @@ The module defines the following items: ...@@ -39,6 +39,7 @@ The module defines the following items:
.. class:: ZipFile .. class:: ZipFile
:noindex:
The class for reading and writing ZIP files. See section The class for reading and writing ZIP files. See section
:ref:`zipfile-objects` for constructor details. :ref:`zipfile-objects` for constructor details.
......
...@@ -23,6 +23,9 @@ transliteration too. ...@@ -23,6 +23,9 @@ transliteration too.
Permissions History Permissions History
------------------- -------------------
- David Malcolm was given commit access on Oct 27 2010 by GFB,
at recommendation by Antoine Pitrou and Raymond Hettinger.
- Tal Einat was given commit access on Oct 4 2010 by MvL, - Tal Einat was given commit access on Oct 4 2010 by MvL,
for improving IDLE. for improving IDLE.
......
...@@ -66,7 +66,7 @@ define lineno ...@@ -66,7 +66,7 @@ define lineno
set $__p = $__p + 1 set $__p = $__p + 1
end end
end end
printf "%d\n", $__li printf "%d", $__li
end end
# print the current frame - verbose # print the current frame - verbose
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment