Python class and variable issue(newby question!)

Dave Angel davea at davea.name
Fri Mar 29 18:56:07 EDT 2013


On 03/29/2013 06:17 PM, Sam Berry wrote:
> Thanks for the responses! My issue was sorted with Benjamins post, just printing s worked.
>
> Cheers for the info though Chris, if i have any further issues il post them with some working code.
>
In that case, you probably should add a line like:


s = None

at the beginning of the code, along with a description of what s is 
supposed to represent (especially since the name doesn't reveal much).

And you should remove the class variable s.  It'll just confuse things.

I guess this isn't the place to rail about non-const globals.

-- 
DaveA



More information about the Python-list mailing list