> OK, so I should include the global only if I plan to modify it.
> Otherwise, I don't need to include it. Am I right?

I guess you could say that's true.  I'm hardly an expert so I couldn't
say there aren't other potential ramifications.  (anyone?)

But, as a rule I would declare the global variable always because
1) it makes my intention clear
2) if I later decided to modify the global variable, I would be less
likely to introduce a bug by forgetting to declare it global.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to