On Thu, 24 Feb 2005 14:23:28 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote: > Bill Mill wrote: > >>class foo: > >> def bar(self): > > > > > > Sorry, I forgot that if it's in the module, you should declare prompt1 > > as global by using "global prompt1" right here. > > > > > >> print prompt1 % (var1, var2, var3) > > No, you only need the global statement if you want to assign to a global > variable. Read-only > reference will work without the global.
This is correct. I do it for myself, just to be as explicit as possible about it, since it's something I don't like to do. Putting the strings into another module is really a much better solution. Thanks for the correction. Peace Bill Mill bill.mill at gmail.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor