Terry J. Reedy <tjre...@udel.edu> added the comment:

To me, Alexander's example
  >>> calendar.isleap("%d")
  False
is a buggy result. So I would reclassify the issue.

The rationale for not checking input types is that bad types result in an 
error, but that does not happen here due to a design decision that some 
consider clever and some buggy, and some both. (Guido himself would like to 
deprecate it.)

I am in favor of the 'year & 3 == 0' fix so that any input string (and indeed, 
anything that does not implement both % and & operators) raises an error. 
Intermediate to expert programmers should know or learn about bit masking. Add 
a comment to explain the reason -- and a test case.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10073>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to