Class attributes newbie question (before I join a cargocult)

mattjfleming at mattjfleming at
Sun Mar 12 19:54:30 CET 2006

Should't the changeSex method be:

def changeSex(self, newsex=""): = newsex

You're creating a new instance variable at the moment i.e 'self.mysex'
doesn't exist until you call changeSex.

More information about the Python-list mailing list