Message 108001 - Python tracker

Message108001

Author mark.dickinson
Recipients alexhsamuel, benjamin.peterson, mark.dickinson, nascheme
Date 2010-06-17.11:15:58
SpamBayes Score 3.3658707e-05
Marked as misclassified No
Message-id <1276773361.24.0.114306613225.issue9011@psf.upfronthosting.co.za>
In-reply-to
Content
N.B.  That if block isn't pure optimization:  removing it gives a minor change in behaviour:

Currently (Python 2.7, on a 64-bit machine):

>>> -9223372036854775808
-9223372036854775808

And with the optimization removed:

>>> -9223372036854775808
-9223372036854775808L

I actually consider the second behaviour more correct than the first, since it follows clearly from the language rules (numeric literals have no sign, so the above *should* be interpreted as the unary minus operator applied to a literal, and that literal really is a PyLong).  But obviously the contributors to issue 1441486 either disagree, or didn't want to introduce a regression from 2.4.

I still consider that removing that if block is the right thing to do for 2.7.  The change in behaviour really shouldn't affect any reasonable code---anywhere that an int is acceptable, a long should be too.



Neil, any comments?
History
Date User Action Args
2010-06-17 11:16:01mark.dickinsonsetrecipients: + mark.dickinson, nascheme, benjamin.peterson, alexhsamuel
2010-06-17 11:16:01mark.dickinsonsetmessageid: <1276773361.24.0.114306613225.issue9011@psf.upfronthosting.co.za>
2010-06-17 11:15:59mark.dickinsonlinkissue9011 messages
2010-06-17 11:15:58mark.dickinsoncreate