ctime(), gmtime(), and localtime() now support None and treat it as tho you passed no arguments at all. i am new to patching for py and am not sure if there are unit tests i should update. please advise...
Logged In: YES user_id=33168 There don't appear to be any direct tests, but it would still be nice to call the functions and verify they work ok. You could compare that abs(ctime() - ctime(None)) < .5, for example. Look in Lib/test/test_time.py. Also, the docs need to be updated, see Doc/lib/libtime.tex. That should be updated, ie change \optional(secs) with \optional{secs\code{ = None}}. Also, an entry in Misc/NEWS should be added since this is an API change. There is no attached file.
Logged In: YES user_id=3066 I'm afraid I've let too much time to go by for this to apply cleanly (my fault; sorry!). I've applied portions of the documentation and news patches, and replaced the implementation and test patches in my commit. Doc/lib/libtime.tex 1.65 Lib/test/test_time.py 1.18 Misc/NEWS 1.1065 Modules/timemodule.c 2.144