Python handles globals badly.

Chris Angelico rosuav at gmail.com
Sat Sep 12 02:27:46 EDT 2015


On Sat, Sep 12, 2015 at 4:25 PM, Random832 <random832 at fastmail.com> wrote:
> Chris Angelico <rosuav at gmail.com> writes:
>> Here. Ned Batchelder explains it better than I can.
>
> See, those diagrams are perfect (well, almost, I think the names should
> have square boxes too). They're arrows. They *point* at
> things. *Pointers*.
>
> The boxes are variables. The circles represent special boxes
> (implemented in C or Java or whatever) that hold things other than
> pointers and therefore can't be used as Python variables.

Okay, okay, you've won. They're pointers. Now, try to do anything with
them. They *instantly* devolve to their referent objects, which means
you cannot do anything with the pointer at all. Congratulations,
pointers do not exist.

ChrisA



More information about the Python-list mailing list