On Jul 18, 1:32 am, John Machin <[EMAIL PROTECTED]> wrote:
> On Jul 18, 4:26 pm, castironpi <[EMAIL PROTECTED]> wrote:
>
> > I delicately ask for an example in natural language and daily life in
> > which we change what object a name refers to,
>
> her, him, it, ... i.e. any pronoun

In that case,

it= Dog( )
refs[ 'it' ]= it
it.walk( )
it= Cat( )
it.feed( )

you don't want refs[ 'it' ] to refer to cat.  You were talking about
the dog when you stored refs[ 'it' ].

The OP might be wanting to mutate locals( ).  If not define a
Reference object,

class Reference:
   def __init__( self, ref ): self.ref= ref

a more descriptive name than Blank (above), to explicitly state that
you're using a reference instead of "fixed-bound" namespace semantics,
or whatever the right word is.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to