[Python-ideas] Message passing syntax for objects

Joao S. O. Bueno jsbueno at python.org.br
Mon Mar 18 20:15:59 CET 2013

On 18 March 2013 15:22, Mark Janssen <dreamingforward at gmail.com> wrote:
> But as I told another poster, I will examine the standard library and
> come up with some good examples of how a standardized data passing
> interface will benefit the programmer.

Before you go into that length maybe you could tell us, for example,
if we have an image object in a 3rd party library
and we want to draw a rectangle. Currently I write something like:

>>> myimage.draw_rect((x1,y1,width, height), RED)

Now, if I want to save this image  to a file:

>>> myimage.save("myfile.png")

So, how would these two simple examples be rewritten in  such a magic
message-only World?


More information about the Python-ideas mailing list