Python handles globals badly.
Random832
random832 at fastmail.com
Sat Sep 12 00:16:40 EDT 2015
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).
More information about the Python-list
mailing list