[Python-Dev] Slot for trunc (original) (raw)
Guido van Rossum guido at python.org
Tue Jan 29 20:17:07 CET 2008
- Previous message: [Python-Dev] Slot for __trunc__
- Next message: [Python-Dev] Slot for __trunc__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <python at rcn.com> wrote:
Should the implementation of trunc have its own slot like we have for nbindex?
Raymond
------------------------------------------------------- rhettinger at localhost ~/py26/Objects $ grep "trunc" *.c floatobject.c: {"trunc", (PyCFunction)floattrunc, METHNOARGS, intobject.c: {"trunc", (PyCFunction)intint, METHNOARGS, longobject.c: {"trunc", (PyCFunction)longlong, METHNOARGS,
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Slot for __trunc__
- Next message: [Python-Dev] Slot for __trunc__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]