Python handles globals badly.

Mark Lawrence breamoreboy at yahoo.co.uk
Sat Sep 12 00:34:40 EDT 2015


On 12/09/2015 05:16, Random832 wrote:
> Mark Lawrence <breamoreboy at yahoo.co.uk> writes:
>> My favourite analogy for Python names, the sticky note, here
>> https://mail.python.org/pipermail/tutor/2006-October/049767.html
>
> Is player3[3] also a sticky note? Wouldn't the note have to have the id
> of player3 written on it somehow? Should the player3 sticky note have
> the id of the global namespace that "player3" is valid in written on it?
>
> I like my analogy better because it means both player3 and (the list we
> call player3)[3] are both the *same* kind of thing: boxes that have
> pointers in them (i.e. variables).
>

For the final time I hope, "pointer" is not appropriate for Python, so 
I'll stick with the sticky note analogy, thanks all the same.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list