Author mark.dickinson
Recipients akitada, belopolsky, christian.heimes, josm, loewis, mark.dickinson, rhettinger, robertwb, zanella
Date 2010-05-01.20:03:07
SpamBayes Score 0.0410162
Marked as misclassified No
Message-id <1272744189.72.0.355962487887.issue1533@psf.upfronthosting.co.za>
In-reply-to
Content
A couple of suggestions regarding the patch:

(1) I'd suggest leaving the first part of handle_range_longs intact, up to and including the "/* ilow and ihigh correct now; do istep */" block.  Then build out the three "if (!PyInt_Check(...)) ..." blocks below to include argument conversion.  I think the patch would look cleaner this way.

(2) Rather than using PyNumber_Long, I'd prefer an explicit check for, and call to, nb_int.  This is the behaviour that's used for the 'l' getargs format.  PyNumber_Long is considerably more complicated, and involves looking at __trunc__ and __long__;  so if you use PyNumber_Long you'll still end up with inconsistent behaviour between small and large arguments.
History
Date User Action Args
2010-05-01 20:03:10mark.dickinsonsetrecipients: + mark.dickinson, loewis, rhettinger, belopolsky, christian.heimes, josm, robertwb, zanella, akitada
2010-05-01 20:03:09mark.dickinsonsetmessageid: <1272744189.72.0.355962487887.issue1533@psf.upfronthosting.co.za>
2010-05-01 20:03:08mark.dickinsonlinkissue1533 messages
2010-05-01 20:03:07mark.dickinsoncreate