[Python-ideas] Assignment decorators (Re: The Descriptor Protocol...)

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Mar 3 21:45:45 CET 2011


Nick Coghlan wrote:
> That is, something that
> made it feasible to reference the name on the left hand side of a
> simple assignment without needing to repeat it as a string with the
> same contents.

I think we should have assignment decorators.

@decorator
lhs = rhs

would be equivalent to

lhs = decorator('lhs', rhs)

-- 
Greg



More information about the Python-ideas mailing list