R
Rob Conner
I dont know how to do this and can't think of a simple way to.
All I want is a dictionary where two keys point to the same object.
(to steal the ascii art from
http://starship.python.net/crew/mwh/hacks/objectthink.html)
I want sometihng like this:
,------. +-------+
| dict |------>|+-----+| +---+
`------' || "a" |+---->| 1 |
|+-----+| +---+
| | ^
|+-----+| |
|| "b" |+-------'
|+-----+|
+-------+
| |
|+-----+| +---+
|| "c" |+---->| 2 |
|+-----+| +---+
+-------+
Where if I change "a" or "b" to 3 the other one will change?
Is this even possible? How would I do it?
All I want is a dictionary where two keys point to the same object.
(to steal the ascii art from
http://starship.python.net/crew/mwh/hacks/objectthink.html)
I want sometihng like this:
,------. +-------+
| dict |------>|+-----+| +---+
`------' || "a" |+---->| 1 |
|+-----+| +---+
| | ^
|+-----+| |
|| "b" |+-------'
|+-----+|
+-------+
| |
|+-----+| +---+
|| "c" |+---->| 2 |
|+-----+| +---+
+-------+
Where if I change "a" or "b" to 3 the other one will change?
Is this even possible? How would I do it?