is this a valid import sequence ?

Steven D'Aprano steve at REMOVE.THIS.cybersource.com.au
Sat Jun 23 14:39:59 EDT 2007


On Sat, 23 Jun 2007 11:03:03 -0700, Scott David Daniels wrote:

> The global statement in Write_LCD_Data is completely unnecessary.  The
> only time you need "global" is if you want to reassociate the global
> name to another object (such as LCD = LCD + 1 or whatever).

That's technically true, but declaring it with global makes the code
self-documenting and therefore easier to read.

It's never _wrong_ to use the global statement, even if it is strictly
unnecessary for the Python compiler.


-- 
Steven.




More information about the Python-list mailing list