[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Lakin Wecker
Lakin Wecker added the comment: Yeah - good point, and I agree. -- ___ Python tracker <http://bugs.python.org/issue13936> ___ ___ Python-bugs-list mailin

[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Lakin Wecker
Lakin Wecker added the comment: Although I find it odd, you are all correct. It is documented. (I don't know how I missed that when I read those docs looking for that exact documentation). It is consistent with the rest of python. Do I close this? Do you guys? I'm fine with

[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Lakin Wecker
Lakin Wecker added the comment: Right. I've updated my code to be more correct: instead of: if not start_time: start_time = default_time it now reads: if start_time is None: start_time = default_time which operates correctly and works fine for my case, I just thought it wa

[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Lakin Wecker
Changes by Lakin Wecker : -- components: +Library (Lib) type: -> behavior ___ Python tracker <http://bugs.python.org/issue13936> ___ ___ Python-bugs-list mai

[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Lakin Wecker
Lakin Wecker added the comment: I'm updating the versions to the ones that I've actually tried it on - this is not an exhaustive search at this point. -- versions: +Python 2.6, Python 2.7 ___ Python tracker <http://bugs.python.o

[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Lakin Wecker
New submission from Lakin Wecker : midnight is represented by datetime.time(0,0,0). However, this time (unlike all other valid times, including datetime.time(0,0,1)) evalutes to false in if conditions: import datetime if datetime.time(0,0,0): print "datetime.time(0,0,0) is not

[issue1257] atexit errors should result in nonzero exit code

2007-10-10 Thread Lakin Wecker
Lakin Wecker added the comment: sorry for the noise and duplication. The full code listing should have been: 46 # Sometimes an exception happens during exit, try to make sure we get 47 # a non_zero exit code. 48 old_exitfunc

[issue1257] atexit errors should result in nonzero exit code

2007-10-10 Thread Lakin Wecker
Lakin Wecker added the comment: I am an agreeance with the original report. I just finished writing an automated test that did the following to work around this behavior: 46 # Sometimes an exception happens during exit, try to make sure we get 47