mirror of https://github.com/python/cpython
Merge 3.2, doc typos.
This commit is contained in:
commit
f8240d6564
|
@ -587,7 +587,7 @@ Glossary
|
||||||
as :keyword:`if`, :keyword:`while` or :keyword:`for`.
|
as :keyword:`if`, :keyword:`while` or :keyword:`for`.
|
||||||
|
|
||||||
struct sequence
|
struct sequence
|
||||||
A tuple with named elements. Struct sequences expose an interface similiar
|
A tuple with named elements. Struct sequences expose an interface similar
|
||||||
to :term:`named tuple` in that elements can either be accessed either by
|
to :term:`named tuple` in that elements can either be accessed either by
|
||||||
index or as an attribute. However, they do not have any of the named tuple
|
index or as an attribute. However, they do not have any of the named tuple
|
||||||
methods like :meth:`~collections.somenamedtuple._make` or
|
methods like :meth:`~collections.somenamedtuple._make` or
|
||||||
|
|
|
@ -36,6 +36,6 @@ that wants to implement an :func:`open` function that wraps the built-in
|
||||||
|
|
||||||
As an implementation detail, most modules have the name ``__builtins__`` made
|
As an implementation detail, most modules have the name ``__builtins__`` made
|
||||||
available as part of their globals. The value of ``__builtins__`` is normally
|
available as part of their globals. The value of ``__builtins__`` is normally
|
||||||
either this module or the value of this modules's :attr:`__dict__` attribute.
|
either this module or the value of this module's :attr:`__dict__` attribute.
|
||||||
Since this is an implementation detail, it may not be used by alternate
|
Since this is an implementation detail, it may not be used by alternate
|
||||||
implementations of Python.
|
implementations of Python.
|
||||||
|
|
|
@ -116,7 +116,7 @@ The following utility functions are defined:
|
||||||
Convert *date_time* to an IMAP4 ``INTERNALDATE`` representation. The
|
Convert *date_time* to an IMAP4 ``INTERNALDATE`` representation. The
|
||||||
return value is a string in the form: ``"DD-Mmm-YYYY HH:MM:SS
|
return value is a string in the form: ``"DD-Mmm-YYYY HH:MM:SS
|
||||||
+HHMM"`` (including double-quotes). The *date_time* argument can be a
|
+HHMM"`` (including double-quotes). The *date_time* argument can be a
|
||||||
number (int or float) represening seconds since epoch (as returned
|
number (int or float) representing seconds since epoch (as returned
|
||||||
by :func:`time.time`), a 9-tuple representing local time (as returned by
|
by :func:`time.time`), a 9-tuple representing local time (as returned by
|
||||||
:func:`time.localtime`), or a double-quoted string. In the last case, it
|
:func:`time.localtime`), or a double-quoted string. In the last case, it
|
||||||
is assumed to already be in the correct format.
|
is assumed to already be in the correct format.
|
||||||
|
|
|
@ -30,7 +30,7 @@ API
|
||||||
|
|
||||||
The first two parameters control the query results. *prefer_final*
|
The first two parameters control the query results. *prefer_final*
|
||||||
indicates whether a final version (not alpha, beta or candidate) is to be
|
indicates whether a final version (not alpha, beta or candidate) is to be
|
||||||
prefered over a newer but non-final version (for example, whether to pick
|
preferred over a newer but non-final version (for example, whether to pick
|
||||||
up 1.0 over 2.0a3). It is used only for queries that don't give a version
|
up 1.0 over 2.0a3). It is used only for queries that don't give a version
|
||||||
argument. Likewise, *prefer_source* tells whether to prefer a source
|
argument. Likewise, *prefer_source* tells whether to prefer a source
|
||||||
distribution over a binary one, if no distribution argument was prodived.
|
distribution over a binary one, if no distribution argument was prodived.
|
||||||
|
|
|
@ -94,7 +94,7 @@ The specific fields you can search are:
|
||||||
Getting metadata information
|
Getting metadata information
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
XML-RPC is a prefered way to retrieve metadata information from indexes.
|
XML-RPC is a preferred way to retrieve metadata information from indexes.
|
||||||
It's really simple to do so::
|
It's really simple to do so::
|
||||||
|
|
||||||
>>> client = xmlrpc.Client()
|
>>> client = xmlrpc.Client()
|
||||||
|
|
|
@ -39,11 +39,12 @@ process one or many requests.
|
||||||
|
|
||||||
When inheriting from :class:`ThreadingMixIn` for threaded connection behavior,
|
When inheriting from :class:`ThreadingMixIn` for threaded connection behavior,
|
||||||
you should explicitly declare how you want your threads to behave on an abrupt
|
you should explicitly declare how you want your threads to behave on an abrupt
|
||||||
shutdown. The :class:`ThreadingMixIn` class defines an attribute
|
shutdown. The :class:`ThreadingMixIn` class defines an attribute
|
||||||
*daemon_threads*, which indicates whether or not the server should wait for
|
*daemon_threads*, which indicates whether or not the server should wait for
|
||||||
thread termination. You should set the flag explicitly if you would like threads
|
thread termination. You should set the flag explicitly if you would like
|
||||||
to behave autonomously; the default is :const:`False`, meaning that Python will
|
threads to behave autonomously; the default is :const:`False`, meaning that
|
||||||
not exit until all threads created by :class:`ThreadingMixIn` have exited.
|
Python will not exit until all threads created by :class:`ThreadingMixIn` have
|
||||||
|
exited.
|
||||||
|
|
||||||
Server classes have the same external methods and attributes, no matter what
|
Server classes have the same external methods and attributes, no matter what
|
||||||
network protocol they use.
|
network protocol they use.
|
||||||
|
@ -115,8 +116,8 @@ or inappropriate for the service) is to maintain an explicit table of partially
|
||||||
finished requests and to use :func:`select` to decide which request to work on
|
finished requests and to use :func:`select` to decide which request to work on
|
||||||
next (or whether to handle a new incoming request). This is particularly
|
next (or whether to handle a new incoming request). This is particularly
|
||||||
important for stream services where each client can potentially be connected for
|
important for stream services where each client can potentially be connected for
|
||||||
a long time (if threads or subprocesses cannot be used). See :mod:`asyncore` for
|
a long time (if threads or subprocesses cannot be used). See :mod:`asyncore`
|
||||||
another way to manage this.
|
for another way to manage this.
|
||||||
|
|
||||||
.. XXX should data and methods be intermingled, or separate?
|
.. XXX should data and methods be intermingled, or separate?
|
||||||
how should the distinction between class and instance variables be drawn?
|
how should the distinction between class and instance variables be drawn?
|
||||||
|
@ -153,9 +154,9 @@ Server Objects
|
||||||
.. method:: BaseServer.serve_forever(poll_interval=0.5)
|
.. method:: BaseServer.serve_forever(poll_interval=0.5)
|
||||||
|
|
||||||
Handle requests until an explicit :meth:`shutdown` request. Polls for
|
Handle requests until an explicit :meth:`shutdown` request. Polls for
|
||||||
shutdown every *poll_interval* seconds. It also calls
|
shutdown every *poll_interval* seconds. It also calls
|
||||||
:meth:`service_actions` which may be used by a subclass or Mixin to provide
|
:meth:`service_actions` which may be used by a subclass or Mixin to provide
|
||||||
various cleanup actions. For e.g. ForkingMixin class uses
|
various cleanup actions. For e.g. ForkingMixin class uses
|
||||||
:meth:`service_actions` to cleanup the zombie child processes.
|
:meth:`service_actions` to cleanup the zombie child processes.
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
.. versionchanged:: 3.3
|
||||||
|
@ -205,7 +206,7 @@ The server classes support the following class variables:
|
||||||
|
|
||||||
.. attribute:: BaseServer.allow_reuse_address
|
.. attribute:: BaseServer.allow_reuse_address
|
||||||
|
|
||||||
Whether the server will allow the reuse of an address. This defaults to
|
Whether the server will allow the reuse of an address. This defaults to
|
||||||
:const:`False`, and can be set in subclasses to change the policy.
|
:const:`False`, and can be set in subclasses to change the policy.
|
||||||
|
|
||||||
|
|
||||||
|
@ -282,7 +283,7 @@ users of the server object.
|
||||||
.. method:: BaseServer.server_activate()
|
.. method:: BaseServer.server_activate()
|
||||||
|
|
||||||
Called by the server's constructor to activate the server. The default behavior
|
Called by the server's constructor to activate the server. The default behavior
|
||||||
just :meth:`listen`\ s to the server's socket. May be overridden.
|
just :meth:`listen`\ s to the server's socket. May be overridden.
|
||||||
|
|
||||||
|
|
||||||
.. method:: BaseServer.server_bind()
|
.. method:: BaseServer.server_bind()
|
||||||
|
@ -293,10 +294,10 @@ users of the server object.
|
||||||
|
|
||||||
.. method:: BaseServer.verify_request(request, client_address)
|
.. method:: BaseServer.verify_request(request, client_address)
|
||||||
|
|
||||||
Must return a Boolean value; if the value is :const:`True`, the request will be
|
Must return a Boolean value; if the value is :const:`True`, the request will
|
||||||
processed, and if it's :const:`False`, the request will be denied. This function
|
be processed, and if it's :const:`False`, the request will be denied. This
|
||||||
can be overridden to implement access controls for a server. The default
|
function can be overridden to implement access controls for a server. The
|
||||||
implementation always returns :const:`True`.
|
default implementation always returns :const:`True`.
|
||||||
|
|
||||||
|
|
||||||
RequestHandler Objects
|
RequestHandler Objects
|
||||||
|
|
Loading…
Reference in New Issue