On +2018-10-27 11:55:11 -0700, [email protected] wrote: > Hi, > > On Mon, 22 Oct 2018, Barry wrote: > > > On 21 Oct 2018, at 19:04, Armin Rigo <[email protected]> wrote: > > > On Sun, 21 Oct 2018 at 16:47, Barry Scott <[email protected]> wrote: > > > > How odd. sys.maxint on macOS and Fedora is (2**63)-1 not (2**31)-1. > > > That's because MacOS and Fedora are not Windows. > > Do you why windows is unique in this respect? > > as I'm struggling with Windows at the moment, I may have an answer ... > > I find that for CPython3, sys.maxsize is (2**31)-1 on 32-bits Python and > (2**63)-1 for 64-bits Python builds. With sys.maxint being a Python2 thing, > it may be different there, but it seems 3 at least is perfectly consistent. > > Best regards, > Wim > -- > [email protected] -- +1 (510) 486 6411 -- www.lavrijsen.net > _______________________________________________ > pypy-dev mailing list > [email protected] > https://mail.python.org/mailman/listinfo/pypy-dev
Does (2**63)-1 work because size is unsigned (presumably?) and (2**63) is then valid as an intermediate value before subtracting 1, whereas for a signed maxint, the intermediate value would have to be specialcased or the value written maybe like (2**62-1)+(2**62) ? Or does it involve a bigint representation somewhere? Regards, Bengt Richter _______________________________________________ pypy-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-dev
