Author benjamin.peterson
Recipients amaury.forgeotdarc, benjamin.peterson, christian.heimes, exarkun, giampaolo.rodola, gregory.p.smith, ialbert, pitrou, rhettinger, wplappert
Date 2009-02-25.19:34:48
SpamBayes Score 2.11965e-11
Marked as misclassified No
Message-id <1afaf6160902251134v3d411b3g70b24be030d9cb9@mail.gmail.com>
In-reply-to <1235574904.03.0.830057342029.issue4565@psf.upfronthosting.co.za>
Content
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.
History
Date User Action Args
2009-02-25 19:34:51benjamin.petersonsetrecipients: + benjamin.peterson, rhettinger, gregory.p.smith, exarkun, amaury.forgeotdarc, pitrou, giampaolo.rodola, christian.heimes, wplappert, ialbert
2009-02-25 19:34:49benjamin.petersonlinkissue4565 messages
2009-02-25 19:34:49benjamin.petersoncreate