summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/2.3.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-12-02 21:13:53 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-12-02 21:13:53 (GMT)
commitee1b01a41b0c1f212588f840a0b79b1b8876cceb (patch)
tree7188423a10613c738cc001a51d996762a6564d26 /Doc/whatsnew/2.3.rst
parent61f0a0261f0fbfd0a6b981c370a8808aad00b107 (diff)
downloadcpython-ee1b01a41b0c1f212588f840a0b79b1b8876cceb.zip
cpython-ee1b01a41b0c1f212588f840a0b79b1b8876cceb.tar.gz
cpython-ee1b01a41b0c1f212588f840a0b79b1b8876cceb.tar.bz2
Issue #21818: Fixed references to classes that have names matching with module
names.
Diffstat (limited to 'Doc/whatsnew/2.3.rst')
-rw-r--r--Doc/whatsnew/2.3.rst12
1 files changed, 6 insertions, 6 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.)