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 pitrou
Recipients ethan.furman, mark.dickinson, pitrou, serhiy.storchaka
Date 2013-12-15.17:28:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387128512.63.0.72990947945.issue19988@psf.upfronthosting.co.za>
In-reply-to
Content
Indeed, the definition and use of __index__ has derived since PEP 357. Nowadays, __index__ means "can be converted to an int without loss".

In any case, I find the behaviour of your "logical type" a bit dubious. If it's like bool but ternary, it *should* convert to int (or perhaps be an int subclass like bool).
History
Date User Action Args
2013-12-15 17:28:32pitrousetrecipients: + pitrou, mark.dickinson, ethan.furman, serhiy.storchaka
2013-12-15 17:28:32pitrousetmessageid: <1387128512.63.0.72990947945.issue19988@psf.upfronthosting.co.za>
2013-12-15 17:28:32pitroulinkissue19988 messages
2013-12-15 17:28:32pitroucreate