diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-02 21:15:22 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-02 21:15:22 (GMT) |
commit | b6a6b45458490c6928e4f915d7bc83b4a7b44799 (patch) | |
tree | 2cf1808557dc3bb99e8ff2f7068e3429767e7b8e /Doc/whatsnew | |
parent | 3c35fdb8fbf72c750ab19036b6145751ccbec856 (diff) | |
parent | ee1b01a41b0c1f212588f840a0b79b1b8876cceb (diff) | |
download | cpython-b6a6b45458490c6928e4f915d7bc83b4a7b44799.zip cpython-b6a6b45458490c6928e4f915d7bc83b4a7b44799.tar.gz cpython-b6a6b45458490c6928e4f915d7bc83b4a7b44799.tar.bz2 |
Issue #21818: Fixed references to classes that have names matching with module
names.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/2.3.rst | 12 | ||||
-rw-r--r-- | Doc/whatsnew/2.4.rst | 2 | ||||
-rw-r--r-- | Doc/whatsnew/2.5.rst | 6 | ||||
-rw-r--r-- | Doc/whatsnew/2.6.rst | 12 |
4 files changed, 16 insertions, 16 deletions
diff --git a/Doc/whatsnew/2.3.rst b/Doc/whatsnew/2.3.rst index b909ccd..93930b8 100644 --- a/Doc/whatsnew/2.3.rst +++ b/Doc/whatsnew/2.3.rst @@ -1683,13 +1683,13 @@ Date and time types suitable for expressing timestamps were added as the fancy features, and just stick to the basics of representing time. The three primary types are: :class:`date`, representing a day, month, and year; -:class:`time`, consisting of hour, minute, and second; and :class:`datetime`, -which contains all the attributes of both :class:`date` and :class:`time`. +:class:`~datetime.time`, consisting of hour, minute, and second; and :class:`~datetime.datetime`, +which contains all the attributes of both :class:`date` and :class:`~datetime.time`. There's also a :class:`timedelta` class representing differences between two points in time, and time zone logic is implemented by classes inheriting from the abstract :class:`tzinfo` class. -You can create instances of :class:`date` and :class:`time` by either supplying +You can create instances of :class:`date` and :class:`~datetime.time` by either supplying keyword arguments to the appropriate constructor, e.g. ``datetime.date(year=1972, month=10, day=15)``, or by using one of a number of class methods. For example, the :meth:`date.today` class method returns the @@ -1708,7 +1708,7 @@ number of methods for producing formatted strings from objects:: '2002 30 Dec' The :meth:`replace` method allows modifying one or more fields of a -:class:`date` or :class:`datetime` instance, returning a new instance:: +:class:`date` or :class:`~datetime.datetime` instance, returning a new instance:: >>> d = datetime.datetime.now() >>> d @@ -1718,11 +1718,11 @@ The :meth:`replace` method allows modifying one or more fields of a >>> Instances can be compared, hashed, and converted to strings (the result is the -same as that of :meth:`isoformat`). :class:`date` and :class:`datetime` +same as that of :meth:`isoformat`). :class:`date` and :class:`~datetime.datetime` instances can be subtracted from each other, and added to :class:`timedelta` instances. The largest missing feature is that there's no standard library support for parsing strings and getting back a :class:`date` or -:class:`datetime`. +:class:`~datetime.datetime`. For more information, refer to the module's reference documentation. (Contributed by Tim Peters.) diff --git a/Doc/whatsnew/2.4.rst b/Doc/whatsnew/2.4.rst index 42d197e..8db90cc 100644 --- a/Doc/whatsnew/2.4.rst +++ b/Doc/whatsnew/2.4.rst @@ -1523,7 +1523,7 @@ code: empty list instead of raising a :exc:`TypeError` exception if called with no arguments. -* You can no longer compare the :class:`date` and :class:`datetime` instances +* You can no longer compare the :class:`date` and :class:`~datetime.datetime` instances provided by the :mod:`datetime` module. Two instances of different classes will now always be unequal, and relative comparisons (``<``, ``>``) will raise a :exc:`TypeError`. diff --git a/Doc/whatsnew/2.5.rst b/Doc/whatsnew/2.5.rst index 38a2359..db8f9df 100644 --- a/Doc/whatsnew/2.5.rst +++ b/Doc/whatsnew/2.5.rst @@ -1307,7 +1307,7 @@ complete list of changes, or look through the SVN logs for all the details. (Contributed by Skip Montanaro and Andrew McNamara.) -* The :class:`datetime` class in the :mod:`datetime` module now has a +* The :class:`~datetime.datetime` class in the :mod:`datetime` module now has a ``strptime(string, format)`` method for parsing date strings, contributed by Josh Spoerri. It uses the same format characters as :func:`time.strptime` and :func:`time.strftime`:: @@ -1497,7 +1497,7 @@ complete list of changes, or look through the SVN logs for all the details. * The :mod:`pyexpat` module now uses version 2.0 of the Expat parser. (Contributed by Trent Mick.) -* The :class:`Queue` class provided by the :mod:`Queue` module gained two new +* The :class:`~queue.Queue` class provided by the :mod:`Queue` module gained two new methods. :meth:`join` blocks until all items in the queue have been retrieved and all processing work on the items have been completed. Worker threads call the other new method, :meth:`task_done`, to signal that processing for an item @@ -1649,7 +1649,7 @@ complete list of changes, or look through the SVN logs for all the details. .. Patch #754022 -* The :mod:`xmlrpclib` module now supports returning :class:`datetime` objects +* The :mod:`xmlrpclib` module now supports returning :class:`~datetime.datetime` objects for the XML-RPC date type. Supply ``use_datetime=True`` to the :func:`loads` function or the :class:`Unmarshaller` class to enable this feature. (Contributed by Skip Montanaro.) diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst index 35931de..4fc0c36 100644 --- a/Doc/whatsnew/2.6.rst +++ b/Doc/whatsnew/2.6.rst @@ -613,10 +613,10 @@ multiple of 4. result = queue.get() print 'Factorial', N, '=', result -A :class:`Queue` is used to communicate the result of the factorial. -The :class:`Queue` object is stored in a global variable. +A :class:`~queue.Queue` is used to communicate the result of the factorial. +The :class:`~queue.Queue` object is stored in a global variable. The child process will use the value of the variable when the child -was created; because it's a :class:`Queue`, parent and child can use +was created; because it's a :class:`~queue.Queue`, parent and child can use the object to communicate. (If the parent were to change the value of the global variable, the child's value would be unaffected, and vice versa.) @@ -2131,7 +2131,7 @@ changes, or look through the Subversion logs for all the details. (Contributed by Christian Heimes and Mark Dickinson.) -* :class:`mmap` objects now have a :meth:`rfind` method that searches for a +* :class:`~mmap.mmap` objects now have a :meth:`rfind` method that searches for a substring beginning at the end of the string and searching backwards. The :meth:`find` method also gained an *end* parameter giving an index at which to stop searching. @@ -2630,7 +2630,7 @@ changes, or look through the Subversion logs for all the details. :class:`datetime.date` and :class:`datetime.time` to the :class:`xmlrpclib.DateTime` type; the conversion semantics were not necessarily correct for all applications. Code using - :mod:`xmlrpclib` should convert :class:`date` and :class:`time` + :mod:`xmlrpclib` should convert :class:`date` and :class:`~datetime.time` instances. (:issue:`1330538`) The code can also handle dates before 1900 (contributed by Ralf Schmitt; :issue:`2014`) and 64-bit integers represented by using ``<i8>`` in XML-RPC responses @@ -3283,7 +3283,7 @@ that may require changes to your code: :class:`datetime.date` and :class:`datetime.time` to the :class:`xmlrpclib.DateTime` type; the conversion semantics were not necessarily correct for all applications. Code using - :mod:`xmlrpclib` should convert :class:`date` and :class:`time` + :mod:`xmlrpclib` should convert :class:`date` and :class:`~datetime.time` instances. (:issue:`1330538`) * (3.0-warning mode) The :class:`Exception` class now warns |