[issue21609] Documentation for datetime.datetime uses microseconds instead of microsecond

2014-05-29 Thread Miquel Garcia

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



[issue21609] Documentation for datetime.datetime uses microseconds instead of microsecond

2014-05-29 Thread Miquel Garcia

Miquel Garcia added the comment:

My mistake. Yes you are right, I was confused with the timedelta class. 

Sorry for the confusion. Many thanks!

Miquel

--
resolution:  -> not a bug
status: open -> closed

___
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