diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/base64.rst | 3 | ||||
-rw-r--r-- | Doc/library/exceptions.rst | 5 | ||||
-rw-r--r-- | Doc/library/functions.rst | 15 | ||||
-rw-r--r-- | Doc/library/socketserver.rst | 2 | ||||
-rw-r--r-- | Doc/reference/simple_stmts.rst | 13 |
5 files changed, 26 insertions, 12 deletions
diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst index 48d24db..ef9c02a 100644 --- a/Doc/library/base64.rst +++ b/Doc/library/base64.rst @@ -62,7 +62,8 @@ The modern interface provides: .. function:: urlsafe_b64encode(s) Encode string *s* using a URL-safe alphabet, which substitutes ``-`` instead of - ``+`` and ``_`` instead of ``/`` in the standard Base64 alphabet. + ``+`` and ``_`` instead of ``/`` in the standard Base64 alphabet. The result + can still contain ``=``. .. function:: urlsafe_b64decode(s) diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index 7129df5..b1626f2 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -348,6 +348,11 @@ The following exceptions are the exceptions that are actually raised. more precise exception such as :exc:`IndexError`. +.. exception:: VMSError + + Only available on VMS. Raised when a VMS-specific error occurs. + + .. exception:: WindowsError Raised when a Windows-specific error occurs or when the error number does not diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index b5a4fb8..f9205b6 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1035,16 +1035,19 @@ are always available. They are listed here in alphabetical order. .. function:: super([type[, object-or-type]]) - Return a *super* object that acts as a proxy to superclasses of *type*. + Return a proxy object that delegates method calls to a parent class of + *type*. This is useful for accessing inherited methods that have been + overriden in a child class. The search order for parent classes is + determined by the ``__mro__`` attribute of the *type* and can change + whenever the parent classes are updated. If the second argument is omitted the super object returned is unbound. If the second argument is an object, ``isinstance(obj, type)`` must be true. If - the second argument is a type, ``issubclass(type2, type)`` must be true. - Calling :func:`super` without arguments is equivalent to ``super(this_class, - first_arg)``. + the second argument is a type, ``issubclass(type2, type)`` must be true (this + is useful for classmethods). - There are two typical use cases for :func:`super`. In a class hierarchy with - single inheritance, :func:`super` can be used to refer to parent classes without + There are two typical use cases for "super". In a class hierarchy with + single inheritance, "super" can be used to refer to parent classes without naming them explicitly, thus making the code more maintainable. This use closely parallels the use of "super" in other programming languages. diff --git a/Doc/library/socketserver.rst b/Doc/library/socketserver.rst index d827b9e..f82f538 100644 --- a/Doc/library/socketserver.rst +++ b/Doc/library/socketserver.rst @@ -508,7 +508,7 @@ An example for the :class:`ThreadingMixIn` class:: # Exit the server thread when the main thread terminates server_thread.setDaemon(True) server_thread.start() - print("Server loop running in thread:", server_thread.getName()) + print("Server loop running in thread:", server_thread.name) client(ip, port, b"Hello World 1") client(ip, port, b"Hello World 2") diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 1e3cb85..d1e89e5 100644 --- a/Doc/reference/simple_stmts.rst +++ b/Doc/reference/simple_stmts.rst @@ -116,7 +116,12 @@ square brackets, is recursively defined as follows. * If the target list is a single target: The object is assigned to that target. -* If the target list is a comma-separated list of targets: +* If the target list is a comma-separated list of targets: The object must be an + iterable with the same number of items as there are targets in the target list, + and the items are assigned, from left to right, to the corresponding targets. + (This rule is relaxed as of Python 1.5; in earlier versions, the object had to + be a tuple. Since strings are sequences, an assignment like ``a, b = "xy"`` is + now legal as long as the string has the right length.) * If the target list contains one target prefixed with an asterisk, called a "starred" target: The object must be a sequence with at least as many items @@ -152,9 +157,9 @@ Assignment of an object to a single target is recursively defined as follows. be deallocated and its destructor (if it has one) to be called. * If the target is a target list enclosed in parentheses or in square brackets: - The object must be a sequence with the same number of items as there are targets - in the target list, and its items are assigned, from left to right, to the - corresponding targets. + The object must be an iterable with the same number of items as there are + targets in the target list, and its items are assigned, from left to right, + to the corresponding targets. .. index:: pair: attribute; assignment |