Python vs. Io

Paul Prescod paul at
Sun Feb 1 22:06:00 CET 2004

Donn Cave wrote:

> |> Dog barks //Io
> |> Dog.barks() #Python
> So, how odd that anyone would think of putting the function
> AFTER the object.  Did this come from Forth or something?

Dog is not just the object. It is also the namespace that "barks" comes 
from. Both the computer and the human need to know the namespace before 
they can interpret the meaning of the string "barks" so it seems natural 
to me that it should come first. This is especially true in languages 
like Python and IO where two objects of even the same type could have 
different name->method mappings.

  Paul Prescod

More information about the Python-list mailing list