.. module:: argparse
:synopsis: Command-line option and argument parsing library.
.. moduleauthor:: Steven Bethard <steven.bethard@gmail.com>
-.. versionadded:: 2.7
+.. versionadded:: 3.2
.. sectionauthor:: Steven Bethard <steven.bethard@gmail.com>
*owner* and *group* are used when creating a tar archive. By default,
uses the current owner and group.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. function:: get_archive_formats()
You can register new formats or provide your own archiver for any existing
formats, by using :func:`register_archive_format`.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. function:: register_archive_format(name, function, [extra_args, [description]])
*description* is used by :func:`get_archive_formats` which returns the
list of archivers. Defaults to an empty list.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. function:: unregister_archive_format(name)
Remove the archive format *name* from the list of supported formats.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
Archiving example
.. method:: Connection.enable_load_extension(enabled)
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
This routine allows/disallows the SQLite engine to load SQLite extensions
from shared libraries. SQLite extensions can define new functions,
.. method:: Connection.load_extension(path)
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
This routine loads a SQLite extension from a shared library. You have to
enable extension loading with ``enable_load_extension`` before you can use
:synopsis: Python's configuration information
.. moduleauthor:: Tarek Ziade <tarek@ziade.org>
.. sectionauthor:: Tarek Ziade <tarek@ziade.org>
-.. versionadded:: 2.7
+.. versionadded:: 3.2
.. index::
single: configuration information
w.reset()
assert len(w.warnings) == 0
- .. versionchanged:: 2.7
+ .. versionchanged:: 3.2
New optional attributes ``*filters`` and ``quiet``.
Return true if and only if the internal flag is true.
- .. versionchanged:: 2.6
- The ``is_set()`` syntax is new.
-
.. method:: set()
Set the internal flag to true. All threads waiting for it to become true
docs. Fredrik Lundh's page is also the location of the development version of
the xml.etree.ElementTree.
-.. versionchanged:: 2.7
+.. versionchanged:: 3.2
The ElementTree API is updated to 1.3. For more information, see
`Introducing ElementTree 1.3
<http://effbot.org/zone/elementtree-13-intro.htm>`_.
optional parser instance. If not given, the standard :class:`XMLParser`
parser is used. Returns an :class:`Element` instance.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. function:: iselement(element)
attributes in this namespace will be serialized with the given prefix, if at
all possible.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. function:: SubElement(parent, tag, attrib={}, **extra)
any specific sequence, except that ``"".join(tostringlist(element)) ==
tostring(element)``.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. function:: XML(text, parser=None)
Appends *subelements* from a sequence object with zero or more elements.
Raises :exc:`AssertionError` if a subelement is not a valid object.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. method:: find(match)
Finds all matching subelements, by tag name or path. Returns an iterable
yielding all matching elements in document order.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. method:: itertext()
Creates a text iterator. The iterator loops over this element and all
subelements, in document order, and returns all inner text.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. method:: makeelement(tag, attrib)
getroot().iterfind(match). Returns an iterable yielding all matching
elements in document order.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. method:: parse(source, parser=None)
the public identifier. *system* is the system identifier. This method
does not exist on the default :class:`TreeBuilder` class.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. _elementtree-xmlparser-objects:
member of the given :class:`ZipInfo` instance. By default, the
:class:`ZipInfo` constructor sets this member to :const:`ZIP_STORED`.
- .. versionchanged:: 2.7
+ .. versionchanged:: 3.2
The *compression_type* argument.
The following data attributes are also available:
Conditional Expressions
=======================
-.. versionadded:: 2.5
-
.. index::
pair: conditional; expression
pair: ternary; operator