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@python
components: Documentation
messages: 219366
nosy: Miquel.Garcia, docs@python
priority: normal
severity: normal
status: open
title: Documentation for datetime.datetime uses microseconds instead of
microsecond
versions: Python 2.7
___
Python tracker
<http://bugs.python.org/issue21609>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com