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 mark.dickinson
Recipients benjamin.peterson, bob.ippolito, collinwinter, georg.brandl, giampaolo.rodola, inducer, jafo, mark.dickinson, nnorwitz, piman
Date 2010-03-01.19:37:14
SpamBayes Score 1.6982573e-07
Marked as misclassified No
Message-id <1267472237.23.0.166681658609.issue1530559@psf.upfronthosting.co.za>
In-reply-to
Content
I'd be open to re-allowing use of __int__ (and __long__) consistently for all integer packing codes in 2.7, as a temporary measure;  I'd really prefer not to allow this for 3.x.

What would make more sense, IMO, would be to allow use of the __index__ method (in both 2.7 and 3.x) to convert custom non-integer classes to integers before packing;  this is supposed to be the modern approach to creating integer-like classes that can be used as integers (e.g., in list indices).  Andreas, would this work for you, or do you need to be able to use __int__ and/or __long__?

Re-opening while we're discussing this.
History
Date User Action Args
2010-03-01 19:37:17mark.dickinsonsetrecipients: + mark.dickinson, nnorwitz, georg.brandl, collinwinter, jafo, bob.ippolito, piman, inducer, giampaolo.rodola, benjamin.peterson
2010-03-01 19:37:17mark.dickinsonsetmessageid: <1267472237.23.0.166681658609.issue1530559@psf.upfronthosting.co.za>
2010-03-01 19:37:15mark.dickinsonlinkissue1530559 messages
2010-03-01 19:37:14mark.dickinsoncreate