summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/cmd.rst10
-rw-r--r--Doc/library/functions.rst5
-rw-r--r--Doc/library/os.path.rst4
-rw-r--r--Doc/library/zipfile.rst7
4 files changed, 15 insertions, 11 deletions
diff --git a/Doc/library/cmd.rst b/Doc/library/cmd.rst
index 5782b5b..cc49990 100644
--- a/Doc/library/cmd.rst
+++ b/Doc/library/cmd.rst
@@ -80,11 +80,13 @@ A :class:`Cmd` instance has the following methods:
are the beginning and ending indexes of the prefix text, which could be used to
provide different completion depending upon which position the argument is in.
- All subclasses of :class:`Cmd` inherit a predefined :meth:`do_help`. This
+ All subclasses of :class:`Cmd` inherit a predefined :meth:`do_help`. This
method, called with an argument ``'bar'``, invokes the corresponding method
- :meth:`help_bar`. With no argument, :meth:`do_help` lists all available help
- topics (that is, all commands with corresponding :meth:`help_\*` methods), and
- also lists any undocumented commands.
+ :meth:`help_bar`, and if that is not present, prints the docstring of
+ :meth:`do_bar`, if available. With no argument, :meth:`do_help` lists all
+ available help topics (that is, all commands with corresponding
+ :meth:`help_\*` methods or commands that have docstrings), and also lists any
+ undocumented commands.
.. method:: Cmd.onecmd(str)
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index f5ff69e..1f67369 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -874,7 +874,7 @@ available. They are listed here in alphabetical order.
*fget* is a function for getting an attribute value, likewise *fset* is a
function for setting, and *fdel* a function for del'ing, an attribute. Typical
- use is to define a managed attribute x::
+ use is to define a managed attribute ``x``::
class C(object):
def __init__(self):
@@ -888,6 +888,9 @@ available. They are listed here in alphabetical order.
del self._x
x = property(getx, setx, delx, "I'm the 'x' property.")
+ If then *c* is an instance of *C*, ``c.x`` will invoke the getter,
+ ``c.x = value`` will invoke the setter and ``del c.x`` the deleter.
+
If given, *doc* will be the docstring of the property attribute. Otherwise, the
property will copy *fget*'s docstring (if it exists). This makes it possible to
create read-only properties easily using :func:`property` as a :term:`decorator`::
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index c4fbae9..ae55dd8 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -212,7 +212,9 @@ write files see :func:`open`, and for accessing the filesystem see the
.. function:: normpath(path)
Normalize a pathname. This collapses redundant separators and up-level
- references so that ``A//B``, ``A/./B`` and ``A/foo/../B`` all become ``A/B``.
+ references so that ``A//B``, ``A/B/``, ``A/./B`` and ``A/foo/../B`` all become
+ ``A/B``.
+
It does not normalize the case (use :func:`normcase` for that). On Windows, it
converts forward slashes to backward slashes. It should be understood that this
may change the meaning of the path if it contains symbolic links!
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
index cbaf0a6..33f58b2 100644
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -15,10 +15,8 @@ advanced use of this module will require an understanding of the format, as
defined in `PKZIP Application Note
<http://www.pkware.com/documents/casestudies/APPNOTE.TXT>`_.
-This module does not currently handle multi-disk ZIP files, or ZIP files
-which have appended comments (although it correctly handles comments
-added to individual archive members---for which see the :ref:`zipinfo-objects`
-documentation). It can handle ZIP files that use the ZIP64 extensions
+This module does not currently handle multi-disk ZIP files.
+It can handle ZIP files that use the ZIP64 extensions
(that is ZIP files that are more than 4 GByte in size). It supports
decryption of encrypted files in ZIP archives, but it currently cannot
create an encrypted file. Decryption is extremely slow as it is
@@ -67,7 +65,6 @@ The module defines the following items:
Returns ``True`` if *filename* is a valid ZIP file based on its magic number,
otherwise returns ``False``. *filename* may be a file or file-like object too.
- This module does not currently handle ZIP files which have appended comments.
.. versionchanged:: 2.7
Support for file and file-like objects.