Benjamin Peterson <benja...@python.org> added the comment: On Wed, Feb 25, 2009 at 10:15 AM, Antoine Pitrou <rep...@bugs.python.org> wrote: > > Antoine Pitrou <pit...@free.fr> added the comment: > > I just took a quick look at Lib/abc.py and there's no way *I*'ll > reimplement it in C :)
I don't blame you for that. :) > > The only workable approach would be: > 1. rename the current would-be ABCs (IOBase, RawIOBase, etc.) with a > leading underscore (_IOBase, _RawIOBase, etc.) > 2. call abc.ABCMeta() with the right arguments to create heap-types > derived from those base types > 3. call XXXIOBase.register() with each of the concrete classes > (BufferedReader, etc.) to register them with the ABCs created in 2 I think this is the best solution. We could also just move the Python ABC's from _pyio to io.py and register() all the C IO classes, but that would prevent the C implementation of IOBase from being used. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4565> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com