binding a reference to a variable

Michael Hudson mwh at python.net
Wed Apr 10 06:22:11 EDT 2002


Andrew Koenig <ark at research.att.com> writes:

> Mark> I'm curious why you need this?
> 
> I want to be able to stuff an object into a larger data
> structure and have that object reach out into a variable and leave a
> trail of breadcrumbs.

Can you come up with a more fleshed out example?  There probably are
some ways of doing what you want but they will be hackish and fragile
(grovelling around in frame objects, etc).  OTOH, if you explain what
you are trying to acheive, perhaps we can come up with a more elegant
way (it strikes me that 2.2's properties may help here, for instance).

Having random variables change their values at random times strikes me
as an idea that might come from - ooh - C++? <wink>

Cheers,
M.

-- 
  I don't have any special knowledge of all this. In fact, I made all
  the above up, in the hope that it corresponds to reality.
                                            -- Mark Carroll, ucam.chat



More information about the Python-list mailing list