[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.
Mark Dickinson
report at bugs.python.org
Thu Nov 6 10:01:56 CET 2008
Mark Dickinson <dickinsm at gmail.com> added the comment:
> Yes, it uses base 2**15 but it's not the correct conversion to base
> 2**15. You convert each PyLong digit to base 2**15 but not the whole
> number.
I don't understand: yes, each base 2**30 digit is converted to a pair
of base 2**15 digits, and if necessary (i.e., if the top 15 bits of the
most significant base 2**30 digit are zero) the size is adjusted. How
is this not converting the whole number?
> As a result, the format is different than the current mashal version.
Can you give an example of an integer n such that marshal.dumps(n) gives
you different results with and without the patch? As far as I can tell,
I'm getting the same marshal results both with the unpatched version and
with the patch applied.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4258>
_______________________________________
More information about the Python-bugs-list
mailing list