On Nov 23, 2014 8:48 AM, "Mitch Raful" <[email protected]> wrote:
>
> Thanks for the replies.   My concern was as the for loop keeps sending
objects into the do_something() function which uses the same reference name
other_object and that the previously instantiated other_objected would be
mutated if the function wasn't finished.  Or do all languages keep each
call to a function in its own memory space and there is not a collision?.

Each call has its own stack of activation records (also known as
"frames").  Temporary variables are localized to the activation records.
Otherwise we would have run into severe issues.  Recursion, for example,
would be much more difficult to write.

If you are talking about threads, then each thread has its own stack of
activation records.
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to