On Thu, Jun 27, 2019 at 12:02:38PM -0400, David Mertz wrote:
Moreover, this new magic is entirely needless. Properties already 100% cover the plausible need.
I've been using Python since version 1.5 and I'm yet to learn a way to prevent re-binding of a simple (undotted) name: x = 1 # okay assert x == 1 x = 2 # raises an exception I'm always happy to learn something new, so if we really can do this with ``property`` I look forward to learning how. But I'm pretty sure you can't do it, not without shifting the goal posts and telling me that I don't really want to do what I said I want to do.
It's really no harder to write 'f.new = mod_value()' than it is to write 'f = mod_value()' with magic behind the scenes.
Well, it's really four key presses harder. But who's counting? -- Steven