[Python-Dev] slice subscripts for sequences and mappings
Antoine Pitrou
solipsis at pitrou.net
Sun Mar 4 14:56:38 CET 2012
On Sat, 3 Mar 2012 18:20:22 -0800
Thomas Wouters <thomas at python.org> wrote:
>
> I'm not sure how the ABCs, which are abstract declarations of semantics,
> tie into this specific implementation detail. ABCs work just as well for
> Python types as for C types, and Python types don't have this distinction.
> The distinction in C types has been *practically* useless for years, so why
> should it stay? What is the actual benefit here?
For one, it's certainly easier to implement an extension type if your
getitem function receives a Py_ssize_t directly, rather than a PyObject.
(it can be more efficient too)
Regards
Antoine.
More information about the Python-Dev
mailing list