[Tutor] Re: references, mutability, dictionaries, etc.

Charlie Clark charlie@begeistert.org
Tue Nov 26 08:21:02 2002


On 2002-11-26 at 13:36:48 [+0100], tutor@python.org wrote:
> As are dictionaries abd, most crucially objects instantiated from 
> classes. Thus if you define a class, instanciate it and then pass it into 
> a function and that function modifies the object the oroginal object will 
> be changed:
> 
I got bitten by this last night: when is an object an object not a 
reference. I found I was automagically updating the REQUEST object in Zope 
without wanting to do this at all. It's the sort of thing coloured syntax 
would be nice for.

Charlie