Martin v. Löwis wrote:
> Guido van Rossum schrieb:
>> Are you interested in doing this at the Google sprint next week?
> 
> Sure; I hadn't any special plans so far.
> 
>> What do you think?
> 
> Sounds good. There are two problems I see:
> 
> - how to benchmark?
> 
> - there are subtle details in the API that require changes
>   to extension code. In particular, PyInt_AsLong currently
>   cannot fail, but can fail with a range error after the
>   unification.

PyInt_AsLong can already fail with OverflowError - pass it a PyLong object and 
it will try to convert it using the nb_int slot and PyLong_AsLong.

PyInt_AsLong is actually somewhat misnamed - it is really PyNumber_AsLong, 
since it accepts arbitrary objects and coerces them to integers via __int__, 
instead of just accepting PyInt instances.

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to