[issue7531] datetime.timedelta doc has incorrect output

Mark Dickinson report at bugs.python.org
Thu Dec 17 15:37:29 CET 2009


Mark Dickinson <dickinsm at gmail.com> added the comment:

Perhaps you're misreading the '//'?  It's a division operator, not the
start of a comment.

The example works fine for me:

dickinsm at alberti:~> python2.6
Python 2.6.2 (r262:71600, Aug 26 2009, 09:40:44)
[GCC 4.2.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import timedelta
>>> year = timedelta(days=365)
>>> ten_years = 10 * year
>>> ten_years, ten_years.days // 365
(datetime.timedelta(3650), 10)

----------
nosy: +mark.dickinson
resolution:  -> works for me
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7531>
_______________________________________


More information about the Python-bugs-list mailing list