Brett Cannon wrote:

> Or the other option is that in the future we just don't have the 
> distinction and make sure that the __getitem__ methods do the requisite 
> type checks.  The type check is done at some point in the C code anyway 
> so it isn't like there is a performance reason for the different slots.

The performance reason is that C code can call the
sq_getitem slot with a C integer directly, without
having to convert to a Python integer and back
again.

Has anyone ever tested whether this is an important
enough gain to be worth keeping the dual slots?

--
Greg
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to