summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-06 08:03:21 (GMT)
committerGeorg Brandl <georg@python.org>2010-10-06 08:03:21 (GMT)
commit16489247aae58e6cfdc8f76fa02867a5e624063d (patch)
tree897e1374905f29729ecc1a4ace2920a428bd3643 /Doc/library
parent16215c732c4c40b6c2555db6083feaaa2f6f5d7b (diff)
downloadcpython-16489247aae58e6cfdc8f76fa02867a5e624063d.zip
cpython-16489247aae58e6cfdc8f76fa02867a5e624063d.tar.gz
cpython-16489247aae58e6cfdc8f76fa02867a5e624063d.tar.bz2
Merged revisions 79901,80170,80273,80342-80343,81061,81366,81368,81370,81840 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ................ r79901 | georg.brandl | 2010-04-08 08:33:16 +0200 (Do, 08 Apr 2010) | 1 line Fix indentation. ................ r80170 | georg.brandl | 2010-04-18 11:50:07 +0200 (So, 18 Apr 2010) | 1 line Remove colspanning cells. ................ r80273 | georg.brandl | 2010-04-20 20:15:54 +0200 (Di, 20 Apr 2010) | 1 line Markup nit. ................ r80342 | georg.brandl | 2010-04-22 09:00:42 +0200 (Do, 22 Apr 2010) | 1 line Fix indentation. ................ r80343 | georg.brandl | 2010-04-22 09:02:51 +0200 (Do, 22 Apr 2010) | 1 line Typo fixes. ................ r81061 | georg.brandl | 2010-05-10 23:17:00 +0200 (Mo, 10 Mai 2010) | 1 line Fix nits in the lexical analysis section: \u requires four digits, backtick is not allowed in source in 3.x. ................ r81366 | georg.brandl | 2010-05-19 22:58:02 +0200 (Mi, 19 Mai 2010) | 61 lines Recorded merge of revisions 80030,80067,80069,80080-80081,80084,80432-80433,80465,80470,81059,81065-81067 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80030 | georg.brandl | 2010-04-13 08:43:54 +0200 (Di, 13 Apr 2010) | 1 line Get rid of multi-row cells. ........ r80067 | georg.brandl | 2010-04-14 10:53:38 +0200 (Mi, 14 Apr 2010) | 1 line #5341: typo. ........ r80069 | georg.brandl | 2010-04-14 15:50:31 +0200 (Mi, 14 Apr 2010) | 1 line Add an x-ref to where the O_ constants are documented and move the SEEK_ constants after lseek(). ........ r80080 | georg.brandl | 2010-04-14 21:16:38 +0200 (Mi, 14 Apr 2010) | 1 line #8399: add note about Windows and O_BINARY. ........ r80081 | georg.brandl | 2010-04-14 23:34:44 +0200 (Mi, 14 Apr 2010) | 1 line #5250: document __instancecheck__ and __subclasscheck__. I hope the part about the class/metaclass distinction is understandable. ........ r80084 | georg.brandl | 2010-04-14 23:46:45 +0200 (Mi, 14 Apr 2010) | 1 line Fix missing. ........ r80432 | georg.brandl | 2010-04-24 10:56:58 +0200 (Sa, 24 Apr 2010) | 1 line Markup fixes. ........ r80433 | georg.brandl | 2010-04-24 11:08:10 +0200 (Sa, 24 Apr 2010) | 1 line #7507: quote "!" in pipes.quote(); it is a special character for some shells. ........ r80465 | georg.brandl | 2010-04-25 12:29:17 +0200 (So, 25 Apr 2010) | 1 line Remove LaTeXy index entry syntax. ........ r80470 | georg.brandl | 2010-04-25 12:57:15 +0200 (So, 25 Apr 2010) | 1 line Patch from Tim Hatch: Make socket setblocking <-> settimeout examples symmetric. ........ r81059 | georg.brandl | 2010-05-10 23:02:51 +0200 (Mo, 10 Mai 2010) | 1 line #8642: fix wrong function name. ........ r81065 | georg.brandl | 2010-05-10 23:46:50 +0200 (Mo, 10 Mai 2010) | 1 line Fix reference direction. ........ r81066 | georg.brandl | 2010-05-10 23:50:57 +0200 (Mo, 10 Mai 2010) | 1 line Consolidate deprecation messages. ........ r81067 | georg.brandl | 2010-05-10 23:51:33 +0200 (Mo, 10 Mai 2010) | 1 line Fix typo. ........ ................ r81368 | georg.brandl | 2010-05-19 23:06:36 +0200 (Mi, 19 Mai 2010) | 9 lines Merged revisions 80068 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80068 | georg.brandl | 2010-04-14 10:56:01 +0200 (Mi, 14 Apr 2010) | 1 line #5341: fix typo and adapt docstring syntax. ........ ................ r81370 | georg.brandl | 2010-05-19 23:39:51 +0200 (Mi, 19 Mai 2010) | 1 line Add descriptor HOWTO to py3k docs. ................ r81840 | alexander.belopolsky | 2010-06-08 20:59:20 +0200 (Di, 08 Jun 2010) | 9 lines Merged revisions 81489 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81489 | georg.brandl | 2010-05-23 17:29:29 -0400 (Sun, 23 May 2010) | 1 line #1436346: make it more obvious that timetuple[7] is yday. ........ ................
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/datetime.rst17
-rw-r--r--Doc/library/multiprocessing.rst10
-rw-r--r--Doc/library/urllib.request.rst2
3 files changed, 16 insertions, 13 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index 5899ba7..456c1a0 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -455,7 +455,9 @@ Instance methods:
Return a :class:`time.struct_time` such as returned by :func:`time.localtime`.
The hours, minutes and seconds are 0, and the DST flag is -1. ``d.timetuple()``
is equivalent to ``time.struct_time((d.year, d.month, d.day, 0, 0, 0,
- d.weekday(), d.toordinal() - date(d.year, 1, 1).toordinal() + 1, -1))``
+ d.weekday(), yday, -1))``, where ``yday = d.toordinal() - date(d.year, 1,
+ 1).toordinal() + 1`` is the day number within the current year starting with
+ ``1`` for January 1st.
.. method:: date.toordinal()
@@ -919,12 +921,13 @@ Instance methods:
Return a :class:`time.struct_time` such as returned by :func:`time.localtime`.
``d.timetuple()`` is equivalent to ``time.struct_time((d.year, d.month, d.day,
- d.hour, d.minute, d.second, d.weekday(), d.toordinal() - date(d.year, 1,
- 1).toordinal() + 1, dst))`` The :attr:`tm_isdst` flag of the result is set
- according to the :meth:`dst` method: :attr:`tzinfo` is ``None`` or :meth:`dst`
- returns ``None``, :attr:`tm_isdst` is set to ``-1``; else if :meth:`dst`
- returns a non-zero value, :attr:`tm_isdst` is set to ``1``; else ``tm_isdst`` is
- set to ``0``.
+ d.hour, d.minute, d.second, d.weekday(), yday, dst))``, where ``yday =
+ d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the day number within
+ the current year starting with ``1`` for January 1st. The :attr:`tm_isdst` flag
+ of the result is set according to the :meth:`dst` method: :attr:`tzinfo` is
+ ``None`` or :meth:`dst`` returns ``None``, :attr:`tm_isdst` is set to ``-1``;
+ else if :meth:`dst` returns a non-zero value, :attr:`tm_isdst` is set to ``1``;
+ else ``tm_isdst`` is set to ``0``.
.. method:: datetime.utctimetuple()
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 85a8241..7fbb258 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -61,15 +61,15 @@ object and then calling its :meth:`~Process.start` method. :class:`Process`
follows the API of :class:`threading.Thread`. A trivial example of a
multiprocess program is ::
- from multiprocessing import Process
+ from multiprocessing import Process
def f(name):
print('hello', name)
- if __name__ == '__main__':
- p = Process(target=f, args=('bob',))
- p.start()
- p.join()
+ if __name__ == '__main__':
+ p = Process(target=f, args=('bob',))
+ p.start()
+ p.join()
To show the individual process IDs involved, here is an expanded example::
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
index c4a8a79..1278434 100644
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -1058,7 +1058,7 @@ Examples
--------
This example gets the python.org main page and displays the first 300 bytes of
-it.::
+it. ::
>>> import urllib.request
>>> f = urllib.request.urlopen('http://www.python.org/')