[Python-3000] PEP 368: Standard image protocol and class

Lino Mastrodomenico l.mastrodomenico at gmail.com
Sun Jul 1 00:18:53 CEST 2007


Hi everyone,

I have submitted a new PEP:

    http://www.python.org/dev/peps/pep-0368/

It starts from a Pete Shinners' suggestion and from the consideration
that there are a lot of Python libraries that use image objects, but
almost all of them have implemented their own image classes,
incompatible with everyone else's (and often not very pythonic).

The PEP tries to improve the situation by defining a standard image
protocol: in practice this is a definition of how a minimal
"image-like" object should look and act in Python. Its details are
carefully chosen to allow existing image classes in Tkinter, PIL,
wxPython and pygame to implement it without breaking backward
compatibility with their existing user bases.

It also proposes the inclusion in the standard library of a fast and
efficient default implementation of the new protocol.

The PEP is long and detailed, but it's not in any way meant to be a
take-it-or-leave-it deal: I'm open to any change, even radical, to
improve it.

It isn't py3k-specific (and it has a low number), but I posted here
anyway because IMHO the main question is if and how to include this in
Python 3.0; then, if the PEP is accepted, I'll backport the new
classes to Python 2.6.

Any suggestion or criticism is welcome; I'll also solicit feedback
from external libraries developers that might be interested in
implementing the new protocol.

Regards

-- 
Lino Mastrodomenico
E-mail: l.mastrodomenico at gmail.com


More information about the Python-3000 mailing list