anonymous assignment
Yves Dorfsman
yves at zioup.com
Mon May 12 23:18:32 EDT 2008
Gabriel Genellina wrote:
>> Uses Python 2.6! ;)
>>
>
> No need of 2.6 - the above code works since Python 2.2 at least:
>
> Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import time
>>>> t=time.localtime()
>>>> type(t)
> <type 'time.struct_time'>
>>>> t.tm_year
> 2008
>
> (but struct_time objects were printed as regular tuples)
>
And not well documented !
Nice one ! Thanks.
More information about the Python-list
mailing list