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 debedb, mark.dickinson, rhettinger, vstinner
Date 2009-02-27.11:38:26
SpamBayes Score 7.771561e-16
Marked as misclassified No
Message-id <1235734709.5.0.444496658795.issue5377@psf.upfronthosting.co.za>
In-reply-to
Content
Why do you care whether the result is an int or a long in this case? 
Does it affect any code that you know of in a meaningful way?

> And why the difference in this behavior between 2.5.1 and 2.5.2.

There were some fairly major changes (many bugfixes, new functions to
comply with an updated specification, for example, pow, log and log10)
to the decimal module between 2.5 and 2.6, and the majority of those
changes were also backported to 2.5.2.  This particular change was part
of a set of changes that changed the internal representation of the
coefficient of a Decimal instance from a tuple to a string, for speed
reasons.  See r59144.

As Victor says, this is trivial to fix;  I'm not convinced that it's
actually worth fixing, though.  In Python 2.5, the difference between
ints and longs should be almost invisible anyway.  It's nice (for
performance reasons) if small integers are represented as ints rather
than longs.  Since this one's only just a small integer, it's difficult
to care much.  :-)
History
Date User Action Args
2009-02-27 11:38:29mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, vstinner, debedb
2009-02-27 11:38:29mark.dickinsonsetmessageid: <1235734709.5.0.444496658795.issue5377@psf.upfronthosting.co.za>
2009-02-27 11:38:27mark.dickinsonlinkissue5377 messages
2009-02-27 11:38:26mark.dickinsoncreate