Is 'everything' a refrence or isn't it?

Aahz aahz at
Sat Jan 14 13:48:40 EST 2006

In article <43c8ff05$1 at>,
Scott David Daniels  <scott.daniels at> wrote:
>An important help to some people's understanding of objects is
>realizing how they are used.  Sometimes an object is used to mediate
>between the real world and a program.  For example, you could design
>an object which controlled a printer, and inserted line breaks a
>page-ejects as needed.
>The "value" of the printer object is not safely replicable -- you
>cannot copy the state of the printer object, attempt to print
>something, and if there is a failure (like "out-of-ink") restore the
>former state of the printer and try another method.  The ink has run
>out.  Nothing in one exclusively in software can get you back to the
>state where you had more ink.  So for such things, the "state" of an
>object is more than simply the rich detail of a data structure.

Yup.  I sometimes say in such cases that the object is a proxy for some
other object (sometimes real-world, sometimes not -- as in the case of a
GUI object).
Aahz (aahz at           <*>

"19. A language that doesn't affect the way you think about programming,
is not worth knowing."  --Alan Perlis

More information about the Python-list mailing list