On Mon, Nov 30, 2015 at 11:38 PM Chris Angelico <rosuav@gmail.com> wrote:
And while I called the class-based system "ugly" to start with, I'm coming around to it more and more - especially since it works in current versions of Python, rather than demanding core interpreter changes. It's not the most intuitive use of syntax either (the 'class' block isn't really creating a class at all - it creates a function parameter list), but it isn't as bad as I thought it was.
One advantage of the ``@property`` syntax is that one can show a new Pythonista how to create read-only properties without needing to explain too many new concepts. Using ``@foo.setter`` sometimes requires a bit more hand-waving. Is there a way to use the metaclass and class-in-a-class as Kevin Modzelewski wrote, but hiding some of the complexity behind a decorator?