Why we will use obj$func() often

Erik Max Francis max at alcyone.com
Fri Apr 23 16:39:18 EDT 2004


Mark Hahn wrote:

> "Fredrik Lundh" <fredrik at pythonware.com> wrote ...
> 
> > > (by the way, Python cannot do this)
> >
> > sure can, if you use mutable integers.
> 
> That's interesting.  I've never heard of them.  Can you show me a code
> example?

Make a container.  Put an integer in it.  Pass the container around. 
Change the integer that's contained in it.

-- 
 __ Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
/  \ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
\__/ I'm paranoid. But am I paranoid enough?
    -- Louis Wu



More information about the Python-list mailing list