Raymond Hettinger wrote:
> [GvR]
>> I don't see why. __index__ has a slot because its 
>> primary use is to be called from C code, where slots
>> add a slight performance advantage.
>> __trunc__ doesn't get called from C AFAIK. 
> 
> I thought the __trunc__ method only gets called from 
> the C code for the trunc() function which is currently
> implemented with PyObject_CallMethod(number, "__trunc__", "")
> instead of a fast call to a slot.

And if __trunc__ qualifies, what about __format__, which is similar? 
I'm not pushing for it, I just wonder how the decision is made.

Eric.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to