Message82713
On Wed, Feb 25, 2009 at 10:15 AM, Antoine Pitrou <report@bugs.python.org> wrote:
>
> Antoine Pitrou <pitrou@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. |
|
Date |
User |
Action |
Args |
2009-02-25 19:34:51 | benjamin.peterson | set | recipients:
+ benjamin.peterson, rhettinger, gregory.p.smith, exarkun, amaury.forgeotdarc, pitrou, giampaolo.rodola, christian.heimes, wplappert, ialbert |
2009-02-25 19:34:49 | benjamin.peterson | link | issue4565 messages |
2009-02-25 19:34:49 | benjamin.peterson | create | |
|