[Python-Dev] PEP 298

Thomas Heller theller@python.net
12 Dec 2002 20:02:24 +0100


Guido van Rossum <guido@python.org> writes:

> There are doubts about its usefulness.  (AKA YAGNI.)  Would you also
> provide implementations for common object types?  Otherwise there
> wouldn't be a point, right?

Not really, IMO. It is an interface, not an implementation (except that
there are 3 helper functions in abstract.c).

I have patches ready for string and unicode objects (trivial), and
started a patch for arrayobject. This is more involved, because the
array must be locked while a buffer pointer is out somewhere.

I could also implement it for mmap objects, there are comparable issues.

Maybe the most useful object type would be the upcoming bytes object
(PEP 296).  It seems, this will not be included in 2.3, but it could also
be implemented as a separate extension - impossible for the locked buffer
interface, which must be included into the core.

If you call YAGNI, it's ok for me, that's why I'm asking. Better save
the time in this case...

Thomas