Jython @property SyntaxError: mismatched input '' expecting CLASS
问题 I tried to run this example from the docs in the Jython interpreter: http://www.jython.org/docs/library/functions.html class C(object): def __init__(self): self._x = None @property def x(self): """I'm the 'x' property.""" return self._x @x.setter def x(self, value): self._x = value @x.deleter def x(self): del self._x Just entering the first 4 lines (up to and including @property ) yields a SyntaxError: >>> class C(object): ... def __init__(self): ... self._x = None ... @property File "<stdin>