Message118458
I would also like to note the following curiosity:
>>> calendar.isleap("%d")
False
I still don't think there is anything worth fixing here, but we can consider replacing year % 4 == 0 predicate with year & 3 == 0 which will change the error raised by isleap("2004") from
TypeError: not all arguments converted during string formatting
to
TypeError: unsupported operand type(s) for &: 'str' and 'int'
I am not sure if the later is much clearer than the former once you consider obfuscated year & 3 == 0 showing up in the backtrace compared to a clear year % 4 == 0 test. |
|
| Date |
User |
Action |
Args |
| 2010-10-12 18:53:57 | belopolsky | set | recipients:
+ belopolsky, eric.araujo, r.david.murray, shadikka |
| 2010-10-12 18:53:57 | belopolsky | set | messageid: <[email protected]> |
| 2010-10-12 18:53:52 | belopolsky | link | issue10073 messages |
| 2010-10-12 18:53:52 | belopolsky | create | |
|