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 Elvis.Pranskevichus
Recipients Elvis.Pranskevichus, amaury.forgeotdarc, rhettinger, stutzbach
Date 2011-03-25.22:45:10
SpamBayes Score 1.1660634e-07
Marked as misclassified No
Message-id <1301093111.02.0.113351611034.issue11674@psf.upfronthosting.co.za>
In-reply-to
Content
I think that explicitly raising TypeError in __len__() is wrong in any case.  I would argue something like NotImplementedError is a better choice to signal the absence of length.  Which also makes me think that Python's exceptions are, maybe, too coarse sometimes.
History
Date User Action Args
2011-03-25 22:45:11Elvis.Pranskevichussetrecipients: + Elvis.Pranskevichus, rhettinger, amaury.forgeotdarc, stutzbach
2011-03-25 22:45:11Elvis.Pranskevichussetmessageid: <1301093111.02.0.113351611034.issue11674@psf.upfronthosting.co.za>
2011-03-25 22:45:10Elvis.Pranskevichuslinkissue11674 messages
2011-03-25 22:45:10Elvis.Pranskevichuscreate