the global keyword:

Joel Goldstick joel.goldstick at gmail.com
Sun Jun 19 13:16:32 EDT 2016


On Sun, Jun 19, 2016 at 10:35 AM, Antoon Pardon
<antoon.pardon at rece.vub.ac.be> wrote:
> Op 12-06-16 om 23:10 schreef BartC:
>> On 12/06/2016 20:25, Ned Batchelder wrote:
>>>   Just as here there is no link between x
>>> and y:
>>>
>>>     x = 12
>>>     y = x
>>
>> (And that's a good illustration of why 'y' isn't a name reference to 'x', referring to the "...ducks limp" thread. But best not to rake it up again...)
>>
> I find this rather inaccurate reference to what your opposition is
> supposed to have states together with the remark best not to rake
> this up again, rather disingenuous
> --
> https://mail.python.org/mailman/listinfo/python-list

People who understand global variables generally avoid using them at
all costs.  People who don't understand why globals create problems
seem to want to use them, and then become baffled at the problems they
cause.  If you are learning python, very very low on your list of
things to learn is global variables.

-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays



More information about the Python-list mailing list