[Tutor] Scope and elegance

Marc Tompkins marc.tompkins at gmail.com
Mon Jan 7 21:37:17 CET 2008


On Jan 7, 2008 12:07 PM, James Newton <jnewton at fuelindustries.com> wrote:

> Hi Python Practicioners!
> ...
> I am not so much concerned in getting this to work (I can already do
> that); I am more concerned with understanding how to treat this in the
> most Pythonesque way.
>

I'd like to get the party line on this as well.  For a while now, I've made
a habit of defining an empty class called Global (Mr. Newton's could be
called Board, of course) at the top of my apps, and using its attributes as
if they were global variables.  It works, of course, but it feels a bit...
dirty.  Is there a more orthodox way to handle it?  Of course, it would be
optimal to remove any need for globals...

-- 
www.fsrtechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080107/7e98ad92/attachment-0001.htm 


More information about the Tutor mailing list