On 15/06/2012 12:44, spa...@gmail.com wrote:
Hello,
The point of good-bad-ness of global variables aside, if I needed to use
them, which is a better place to put them.
1. In the __init__ function of a class? So they are available at the time
an object is initialized or
2. In the actual function of the class where the variables are needed?
Pros and Cons of either approach?
Thanks and Regards,
Sumod
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
I don't understand why you would need global variables, and then
promptly start discussing them wrt classes. Please explain what you are
trying to achieve and I'm certain that we'll come up with the best
solution for your use case.
--
Cheers.
Mark Lawrence.
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor