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.

classification
Title: time.localtime() docstring has a wrong fieldname
Type: behavior Stage:
Components: Documentation Versions: Python 2.6, Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: brett.cannon, tapybugs
Priority: normal Keywords:

Created on 2007-12-24 17:38 by tapybugs, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg58985 - (view) Author: (tapybugs) Date: 2007-12-24 17:38
The docstring says "tm_day" but dir() knows "tm_mday" only:

Python 2.5.1 (r251:54863, Oct  5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> print time.localtime.__doc__
localtime([seconds]) ->
(tm_year,tm_mon,tm_day,tm_hour,tm_min,tm_sec,tm_wday,tm_yday,tm_isdst)

Convert seconds since the Epoch to a time tuple expressing local time.
When 'seconds' is not passed in, convert the current time instead.

>>> print dir(time.localtime())
['__add__', '__class__', '__contains__', '__delattr__', '__doc__',
'__eq__', '__ge__', '__getattribute__', '__getitem__', '__getslice__',
'__gt__', '__hash__', '__init__', '__le__', '__len__', '__lt__',
'__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__',
'__repr__', '__rmul__', '__setattr__', '__str__', 'n_fields',
'n_sequence_fields', 'n_unnamed_fields', 'tm_hour', 'tm_isdst',
'tm_mday', 'tm_min', 'tm_mon', 'tm_sec', 'tm_wday', 'tm_yday', 'tm_year'
msg58986 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2007-12-24 20:01
Fixed in r59596 and r59597.
History
Date User Action Args
2022-04-11 14:56:29adminsetgithub: 46036
2007-12-24 20:01:45brett.cannonsetstatus: open -> closed
resolution: fixed
messages: + msg58986
versions: + Python 2.6
2007-12-24 19:41:55brett.cannonsetassignee: brett.cannon
nosy: + brett.cannon
2007-12-24 17:38:50tapybugscreate