My personal feeling: I would love this idea (DRY gets me almost every time) if it weren't for that awful, terrible `class` keyword hanging out there.
I wouldn't call using class this way "abuse", exactly, but it could be a potential use for an old idea raised more than once in the past: some kind of submodule or namespace definition statement:
class Test:
@Property
ns foo: # ns a new syntax meaning a namespace, or "submodule", object
"""Docstring for foo"""
def fget(self):
print("Getting foo")
return self._foo
def fset(self, x):
print("Setting foo to", x)
self._foo = x
---
Ricky.
"I've never met a Kentucky man who wasn't either thinking about going home or actually going home." - Happy Chandler