A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-January/076640.html below:

[Python-Dev] Slot for __trunc__

[Python-Dev] Slot for __trunc__Guido van Rossum guido at python.org
Tue Jan 29 20:17:07 CET 2008
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 nb_index?
>
> Raymond
>
>
> -------------------------------------------------------
> rhettinger at localhost ~/py26/Objects $ grep "__trunc__" *.c
> floatobject.c:  {"__trunc__",   (PyCFunction)float_trunc, METH_NOARGS,
> intobject.c:    {"__trunc__",   (PyCFunction)int_int,   METH_NOARGS,
> longobject.c:   {"__trunc__",   (PyCFunction)long_long, METH_NOARGS,
> _______________________________________________
> 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/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4