Re: [Python-Dev] Slot for __trunc__

2008-01-29 Thread Guido van Rossum
On Jan 29, 2008 11:34 AM, Raymond Hettinger <[EMAIL PROTECTED]> 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 __tr

Re: [Python-Dev] Slot for __trunc__

2008-01-29 Thread Eric Smith
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 cod

Re: [Python-Dev] Slot for __trunc__

2008-01-29 Thread Raymond Hettinger
[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 c

Re: [Python-Dev] Slot for __trunc__

2008-01-29 Thread Guido van Rossum
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. On Jan 29, 2008 11:04 AM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > Should the implementation of __trunc__ have