On Jun 01, 2016, at 03:53 PM, M.-A. Lemburg wrote:
This could be done via a decorator:
@recordbinding x = obj
to result in the compiler generating the following code:
x = obj obj.recordbinding('x', 2)
I like the idea of using a decorator because it's familiar syntax and we all already (think we) know what it means. However, in this case, wouldn't
@recordbinding x = obj
translate to
x = obj recordbinding(x)
?
The way you've written it, obj must be a type that implements the recordbinding method, but that's not what I'd expect.
Cheers, -Barry