Label-Value (was: Re: Inheriting the @ sign from Ruby)

Alex Martelli aleaxit at yahoo.com
Thu Dec 14 15:47:02 EST 2000


"Rainer Deyke" <root at rainerdeyke.com> wrote in message
news:Co9_5.25465$x6.13756579 at news2.rdc2.tx.home.com...
> "Alex Martelli" <aleaxit at yahoo.com> wrote in message
> news:91a1vr02b02 at news2.newsguy.com...
> > There is no value *IN* x.
> >
> > A variable *REFERS TO* 'a value' (aka 'an object').
>
> If somebody really wants mutable integer objects, they're not that hard to
> create.
>
> class MutableInt(UserInt.UserInt):
>   def set(self, value):
>     self.data = value

UserInt is not in the Python 2 docs, though it's nice to hear it exists:-).

Anyway, I had already provided a more generic class Mutable elsewhere
on (this or a parallel) thread 1-2 days ago -- including the explanation
of why I want a 'return value' to end this set statement...:-)


Alex






More information about the Python-list mailing list