[issue15802] Nonsensical test for mailbox
Serhiy Storchaka
report at bugs.python.org
Wed Aug 29 10:46:27 CEST 2012
Serhiy Storchaka added the comment:
Yes, the previous check nonsensical in two cases -- comparing strings and comparing with wrong value.
groups[0] -- current seconds (str),
groups[1] -- current milliseconds (str),
previous_groups[0] -- previous seconds (str),
previous_groups[1] -- previous milliseconds (str).
As I understand sensible check should be: current seconds >= previous seconds and if current seconds == previous seconds then current milliseconds >= previous milliseconds.
In other words, (int(groups[0]), int(groups[1])) >= (int(previous_groups[0]), int(previous_groups[1])).
----------
title: Illegal test for mailbox -> Nonsensical test for mailbox
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15802>
_______________________________________
More information about the Python-bugs-list
mailing list