Travis E. Oliphant wrote:
Here is my C-API proposal
1) PyIndex_Check(obj)
Similar to PyIter_Check(obj) as it just checks for whether or not the
object can call nb_index. Actually implemented as a macro.
2) PyObject* PyNumber_Index(obj)
Simple interface around nb_index that
Travis E. Oliphant wrote:
Travis E. Oliphant wrote:
Here is my C-API proposal
1) PyIndex_Check(obj)
Similar to PyIter_Check(obj) as it just checks for whether or not the
object can call nb_index. Actually implemented as a macro.
2) PyObject* PyNumber_Index(obj)
Simple interface
Guido van Rossum wrote:
It seems like Nick's recent patches solved the problems that were
identified.
Nick, can you summarize how your patches differ from my proposal?
nb_index and __index__ are essentially exactly as you propose. To make an
object implemented in C usable as an index you
Guido van Rossum wrote:
On 8/10/06, Nick Coghlan [EMAIL PROTECTED] wrote:
Guido van Rossum wrote:
It seems like Nick's recent patches solved the problems that were
identified.
Nick, can you summarize how your patches differ from my proposal?
nb_index and __index__ are essentially
Guido van Rossum wrote:
On 8/10/06, Nick Coghlan [EMAIL PROTECTED] wrote:
Guido van Rossum wrote:
It seems like Nick's recent patches solved the problems that were
identified.
Nick, can you summarize how your patches differ from my proposal?
nb_index and __index__ are essentially exactly as
Thanks for your understanding.
Anyway, Nick's patch differs in at least one significant way from my
proposal -- (10**10).__index__() returns sys.maxint in his patch,
while I want it to return 100L. So this is still an open
issue.
--Guido
On 8/10/06, Travis E. Oliphant [EMAIL PROTECTED]
Guido van Rossum wrote:
What do you think (10**10).__index__() should return (when called from
Python)?
I'm with Guido on this point. I think (10**10).__index__() should
return the full long integer when called from within Python.
-Travis
___
(adding back python-dev in the CC: list)
Right. I guess I didn't recompile after patching. Silly me (as Orlijn
would say :-).
Neal+Anthony, do you need me to review Nick's patch? If I don't have
to I'd rather pay more attention to py3k, which I've sadly neglected
in the past month (apart from
Here's another issue where Neal thought it would be useful if I
weighed in. I'm not quite sure of the current status, but perhaps the
following would work?
- Called from Python, (10**10).__index__() should return 100L,
not raise an exception or return sys.maxint.
- The nb_index slot is
Guido van Rossum wrote:
Here's another issue where Neal thought it would be useful if I
weighed in. I'm not quite sure of the current status, but perhaps the
following would work?
- Called from Python, (10**10).__index__() should return 100L,
not raise an exception or return
On 8/9/06, Travis E. Oliphant [EMAIL PROTECTED] wrote:
Guido van Rossum wrote:
Here's another issue where Neal thought it would be useful if I
weighed in. I'm not quite sure of the current status, but perhaps the
following would work?
- Called from Python, (10**10).__index__() should
11 matches
Mail list logo