[Tutor] scope question
Poor Yorick
gp@pooryorick.com
Wed Jan 15 18:36:00 2003
Norvell Spearman wrote:
>On Wednesday, 2003.01.15, 15:42:27 -0700, Poor Yorick wrote:
>
>>By the way, I finally got a good understanding of this by experimenting
>>with passing mutable vs immutable objects into different test functions.
>>You have to be careful when passing a mutable object like a list into a
>>function because if you can change an element within the list the change
>>will be visible to any variables referencing that list object, inside or
>>outside of your function.
>>
>
>The tutorial I'm using is pretty good about stating each data type's
>mutability or immutability; I probably need to go back and memorize
>them. Thanks.
>
I spent most of this year studying Wesley Chun's "Core Python
Programming", and highly recommend it. Once I felt quite familiar with
all the principles in that book, I moved on to "Programming Python", by
Mark Lutz. Taken together, these two books provided me a thorough
introduction not only to programming in Python, but to the art of
programming in general. It has also been invaluable to have people on
this list reiterate the same principles in a their own ways.
Poor Yorick
gp@pooryorick.com