mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Merged revisions 69576,69579-69580,69589,69619-69620,69633,69703-69704,69728-69730 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69576 | georg.brandl | 2009-02-13 04:56:50 -0600 (Fri, 13 Feb 2009) | 1 line #1661108: note that urlsafe encoded string can contain "=". ........ r69579 | georg.brandl | 2009-02-13 05:06:59 -0600 (Fri, 13 Feb 2009) | 2 lines Fix warnings GCC emits where the argument of PyErr_Format is a single variable. ........ r69580 | georg.brandl | 2009-02-13 05:10:04 -0600 (Fri, 13 Feb 2009) | 2 lines Fix warnings GCC emits where the argument of PyErr_Format is a single variable. ........ r69589 | martin.v.loewis | 2009-02-13 14:11:34 -0600 (Fri, 13 Feb 2009) | 2 lines Move amd64 properties further to the top, so that they override the linker options correctly. ........ r69619 | benjamin.peterson | 2009-02-14 11:00:51 -0600 (Sat, 14 Feb 2009) | 1 line this needn't be a shebang line ........ r69620 | georg.brandl | 2009-02-14 11:01:36 -0600 (Sat, 14 Feb 2009) | 1 line #5179: don't leak PIPE fds when child execution fails. ........ r69633 | hirokazu.yamamoto | 2009-02-15 03:19:48 -0600 (Sun, 15 Feb 2009) | 1 line Fixed typo. ........ r69703 | raymond.hettinger | 2009-02-16 16:42:54 -0600 (Mon, 16 Feb 2009) | 3 lines Issue 5229: Documentation for super() neglects to say what super() actually does ........ r69704 | raymond.hettinger | 2009-02-16 17:00:25 -0600 (Mon, 16 Feb 2009) | 1 line Add explanation for super(type1, type2). ........ r69728 | georg.brandl | 2009-02-17 18:22:55 -0600 (Tue, 17 Feb 2009) | 2 lines #5297: fix example. ........ r69729 | georg.brandl | 2009-02-17 18:25:13 -0600 (Tue, 17 Feb 2009) | 2 lines #5296: sequence -> iterable. ........ r69730 | georg.brandl | 2009-02-17 18:31:36 -0600 (Tue, 17 Feb 2009) | 2 lines #5268: mention VMSError. ........
This commit is contained in:
parent
e69a6b2ddf
commit
d75fcb4ddf
11 changed files with 61 additions and 26 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue