[Python-3000] Generic functions vs. OO

Bill Janssen janssen at parc.com
Wed Nov 29 18:07:08 CET 2006


I've updated the page to answer a few questions Jim Jewett posed, and
to expand a few more interfaces.  I haven't tried to explain the
implementation types, like Code or Frame.  I'm hoping someone else
will do that.  I've broken up the File type into a set of types which
attempt to capture (1) the difference between an open file-system
file, and a file-like object, and (2) the difference between files
opened in binary mode and files opened in text mode.

Going through the type system again is interesting, and raises a few
questions about some of the interfaces.  For instance, should files
opened in binary mode support iteration?  If so, what's the unit of
iteration?

See http://wiki.python.org/moin/AbstractBaseClasses for more.

Bill

> Guido van Rossum wrote:
> > I wonder if a bunch of well thought-out standard ABCs, applied to the
> > standard data types, and perhaps more support for setting __bases__,
> > wouldn't address most concerns.
> 
> I think it would, but I don't know if we're going to get anywhere
> without getting more concrete.  Let's tap "the wisdom of crowds".  I've
> set up a Wiki page at http://wiki.python.org/moin/AbstractBaseClasses,
> and spent a little time defining some ABCs and concrete classes.  I'll
> work on it more over the week, but feel free to pitch in and expand it.
> Or create alternative versions (create a new Wiki page, and put a link
> to it at the top of the existing page).
> 
> Bill


More information about the Python-3000 mailing list