It does not behave as None but as False (so you can actually test to see if 
it is None). For details, see At the 
end of that issue discussion, you will not it was closed with a commit that 
changed the behavior in Python 3.5 (in 3.5, time(0, 0) evaluates to True). 
If you are trying to determine if the relevant value is None, just test for 
that explicitly:

if time_or_none is not None:


On Friday, October 14, 2016 at 5:07:16 AM UTC-4, Yebach wrote:
> Hello
> I have a datetime field in db. If I set time to 0:00  - datetime.time(0, 
> 0) the if statement behaves as variable is None
> Any ideas why?

- (Documentation)
- (Source code)
- (Report Issues)
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to