I am trying to use a property method to set the status of a class instance, with the following class definition:
class Result: def __init__(self,x=None,y
On Python 2, you must inherit from object for properties to work:
object
class Result(object):
to make it a new-style class. With that change your code works:
>>> res = Result(5,6) >>> res.visible False >>> res.visible = True >>> res.currentStatus() 'You can see me!'