As for me, I find this problem annoying, but easy to solve. My solution is:

this=__import__(__name__)

To  set global variable spam to 4, I say:

this.spam=4

This always works, and is much more convenient than:

global spam
spam=4

and then worry about local variables also named spam.

On 5 Apr 2007 02:19:34 -0700, sairam <[EMAIL PROTECTED]> wrote:

I have some local variables defined in one method and Can I make those
variables as global variables? If so , can any one explain me how can
I do that


Thanks,
Sairam

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

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

Reply via email to