This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Miquel.Garcia
Recipients Miquel.Garcia, docs@python
Date 2014-05-29.21:03:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401397393.28.0.277127762562.issue21609@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2014-05-29 21:03:13Miquel.Garciasetrecipients: + Miquel.Garcia, docs@python
2014-05-29 21:03:13Miquel.Garciasetmessageid: <1401397393.28.0.277127762562.issue21609@psf.upfronthosting.co.za>
2014-05-29 21:03:13Miquel.Garcialinkissue21609 messages
2014-05-29 21:03:12Miquel.Garciacreate