[Python-ideas] Decorators for variables

Matthias welp boekewurm at gmail.com
Fri Apr 1 13:53:32 EDT 2016


 > But, I think the benefit for @decorator on functions is mainly because a
> function body is big, and this way we can read the decorator next to the
> function signature while on a variable, this just add another way to
> call a function on a variable.

Yes, it is, but I proposed it to give a visual indicator that it does not
change the value that is assigned to the identifier, but rather changes the
behaviour of the identifier, just like what most function decorators do.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160401/0a6cef95/attachment.html>


More information about the Python-ideas mailing list