Message100265
More or less, yes: when trying to pack a non-integer `x` (i.e. something that's not an instance of int or long) with an integer format code (one of 'bBhHiIlLqQ', or 'P'), `x.__index__()` would be called to convert `x` to an integer, and that integer would be packed as usual (possibly raising OverflowError). Other format codes wouldn't be affected.
I'm not quite sure what you mean by 'beforehand': the conversion would happen at the same time as it currently does.
It might be a struggle for me to get to this before the 2.7 betas. If anyone's interested in submitting a patch, it would be welcome. |
|
Date |
User |
Action |
Args |
2010-03-01 20:09:18 | mark.dickinson | set | recipients:
+ mark.dickinson, nnorwitz, georg.brandl, collinwinter, jafo, bob.ippolito, piman, inducer, giampaolo.rodola, benjamin.peterson |
2010-03-01 20:09:18 | mark.dickinson | set | messageid: <1267474158.56.0.918560646594.issue1530559@psf.upfronthosting.co.za> |
2010-03-01 20:09:15 | mark.dickinson | link | issue1530559 messages |
2010-03-01 20:09:15 | mark.dickinson | create | |
|