This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients belopolsky, eric.araujo, georg.brandl, pjenvey, r.david.murray, shadikka, terry.reedy
Date 2010-10-15.20:45:31
SpamBayes Score 1.0973895e-09
Marked as misclassified No
Message-id <1287175534.05.0.683235795744.issue10073@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-10-15 20:45:34terry.reedysetrecipients: + terry.reedy, georg.brandl, belopolsky, pjenvey, eric.araujo, r.david.murray, shadikka
2010-10-15 20:45:34terry.reedysetmessageid: <1287175534.05.0.683235795744.issue10073@psf.upfronthosting.co.za>
2010-10-15 20:45:32terry.reedylinkissue10073 messages
2010-10-15 20:45:31terry.reedycreate