[Python-Dev] Slot for trunc (original) (raw)
Raymond Hettinger python at rcn.com
Tue Jan 29 20:34:15 CET 2008
- Previous message: [Python-Dev] Slot for __trunc__
- Next message: [Python-Dev] Slot for __trunc__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[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.
Raymond
- Previous message: [Python-Dev] Slot for __trunc__
- Next message: [Python-Dev] Slot for __trunc__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]