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 vstinner
Recipients debedb, mark.dickinson, rhettinger, terry.reedy, vstinner
Date 2009-03-29.11:38:39
SpamBayes Score 1.4366286e-13
Marked as misclassified No
Message-id <1238326723.54.0.306166260793.issue5377@psf.upfronthosting.co.za>
In-reply-to
Content
> I'm still not sure why anyone would care about getting longs
> instead of ints back from int(x)

It's strange that sometimes we need to write int(int(obj)) to get an
integer :-/ I usually use int(x) to convert x to an integer (type 'int'
and not 'long').

> (0) Please could you add some tests!

done

> (1) Shouldn't the first line you added include a check 
> for res == NULL?  

segfault... ooops :-) fixed

> (2) It looks as though the patched code ends up calling 
> PyLong_Check twice (...)

done

See updated patch.
History
Date User Action Args
2009-03-29 11:38:43vstinnersetrecipients: + vstinner, rhettinger, terry.reedy, mark.dickinson, debedb
2009-03-29 11:38:43vstinnersetmessageid: <1238326723.54.0.306166260793.issue5377@psf.upfronthosting.co.za>
2009-03-29 11:38:42vstinnerlinkissue5377 messages
2009-03-29 11:38:41vstinnercreate