indirect references

Paul Prescod paul at prescod.net
Tue Jun 6 16:54:52 EDT 2000


shaleh at debian.org wrote:
> 
> How do I do this in python:
> 
> foo = 'string'
> bar = foo
> 
> somehow assign to bar and change the value of foo.

There are hundreds of ways to do something like this but the best one
depends on what problem you are trying to solve. The most
straight-forward is to use a list of characters rather than a string
object, but that is probably not the best way.

-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
Alabama's constitution is 100 years old, 300 pages long and has more
than
600 amendments. Highlights include "Amendment 393: Amendment of
Amendment
No.  351", "Validation of Laws Regulating Court Costs in Randolph
County",
"Miscegenation laws", "Bingo Games in Russell County", "Suppression
of dueling".  - http://www.legislature.state.al.us/ALISHome.html




More information about the Python-list mailing list