diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2010-12-08 21:21:56 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2010-12-08 21:21:56 (GMT) |
commit | 72572319fcabf1478e99f8d7c69e3385e4b45482 (patch) | |
tree | b5f3ae752a63707ac2d77f372de8aee498df0282 /Doc | |
parent | 3405de03a638b1a5b414c78a10d027717968bbfb (diff) | |
download | cpython-72572319fcabf1478e99f8d7c69e3385e4b45482.zip cpython-72572319fcabf1478e99f8d7c69e3385e4b45482.tar.gz cpython-72572319fcabf1478e99f8d7c69e3385e4b45482.tar.bz2 |
Added a datetime new features entry
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/whatsnew/3.2.rst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index 096aabb..725d483 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -609,6 +609,27 @@ New, Improved, and Deprecated Modules (Contributed by Raymond Hettinger and incorporating design suggestions from Mark Dickinson.) +.. XXX: Add a section describing new feature added to datetime module + + * The :mod:`datetime` received several new features including + + - A new type, :class:`timezone` that implements :class:`tzinfo` + interface by returning fixed UTC offset and timezone name. This + makes it easier to create aware :class:datetime` objects:: + + >>> datetime.datetime.now(datetime.timezone.utc) + datetime.datetime(2010, 12, 8, 21, 4, 2, 923754, tzinfo=datetime.timezone.utc) + + >>> datetime.datetime.strptime("01/01/2000 12:00 +0000", "%m/%d/%Y %H:%M %z") + datetime.datetime(2000, 1, 1, 12, 0, tzinfo=datetime.timezone.utc) + + (See :issue:`5094` and :issue:`6641`.) + + - :class: timedelta objects can now be multiplied by float and + divided by float and int objects. + + (See :issue:`1289118`.) + * The :mod:`nntplib` module gets a revamped implementation with better bytes and unicode semantics as well as more practical APIs. These improvements break compatibility with the nntplib version in Python 3.1, which was partly |