[New-bugs-announce] [issue21609] Documentation for datetime.datetime uses microseconds instead of microsecond
Miquel Garcia
report at bugs.python.org
Thu May 29 23:03:13 CEST 2014
New submission from Miquel Garcia:
In browsing the documentation for datetime.datetime:
https://docs.python.org/2/library/datetime.html
It states that the datetime.datetime.microseconds returns the number of microseconds but in trying (Python 2.7.1 r271:86832):
import datetime
print datetime.datetime.now().microseconds
The interpreter returns
AttributeError: 'datetime.datetime' object has no attribute 'microseconds'
The correct way to access the number of microseconds is by:
datetime.datetime.now().microsecond # Note the final 's'
which is not consistent with the documentation.
Many thanks
Miquel
----------
assignee: docs at python
components: Documentation
messages: 219366
nosy: Miquel.Garcia, docs at python
priority: normal
severity: normal
status: open
title: Documentation for datetime.datetime uses microseconds instead of microsecond
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21609>
_______________________________________
More information about the New-bugs-announce
mailing list