[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why are people so afraid of globals?
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 9 Jul 2010 18:38:54 +0200
On Fri, Jul 9, 2010 at 6:32 PM, Mark Hamburg <mark@grubmah.com> wrote:
> function say_hello()
> global print
> print( "Hello" )
> end
Which is how it works in Python, AFAIK. This does have the virtue of
making functions more self-contained and not reliant on a 'local print
= print' somewhere near the top of the module.
steve d.