[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

Antoine Pitrou report at bugs.python.org
Wed Apr 6 16:52:55 CEST 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> 1. It's an external API. We *don't control* most of the potentially
> broken code, so saying "just fix the call sites" effectively solves
> nothing and leaves classes like OrderedDict at risk of subtle silent
> corruption whenever they are passed to a 3rd party C extension.

But since that problem has been existing for ages, we're not in a rush
to fix it either, are we?
After all, people do have to fix their code from time to time (or port
it to Python 3). Using the right APIs for the job is part of that.
Pointing to the abstract alternatives in the documentation for concrete
APIs may help people do so.

In the long term, having a clean CPython API with a proper separation of
concerns is a major benefit.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10977>
_______________________________________


More information about the Python-bugs-list mailing list