[Tutor] calling setters of superclasses
alan.gauld at btinternet.com
Sat Dec 18 02:25:29 CET 2010
"Gregory, Matthew" <matt.gregory at oregonstate.edu> wrote
> class PositiveX(object):
> def __init__(self):
> def x(self):
> def x(self, val):
I don't use properties in Python very often (hardly ever in fact)
and I've never used @setter so there may be naming requirements
I'm not aware of. But in general I'd avoid having two methods with
the same name.
Try renaming the setter to setX() or somesuch and see if you
get the same error.
Just a thought.
More information about the Tutor