[Python-ideas] why is there no decoration for objects
Joseph Jevnik
joejev at gmail.com
Fri Aug 21 05:18:02 CEST 2015
This is just function application
On Thu, Aug 20, 2015 at 10:32 PM, shiva prasanth <kesavarapu.siva at gmail.com>
wrote:
> clearly
> we write decorators for classes and functions and now why not for objects
>
> suppose
> def increment(a):
> return a+1
> a=5
> @increment
> a
> should modify the value of a to 6
> but instead it is giving an error
> i think we should add decorators for objects also
> since when you are reviewing the same code
> @increment is easier to understand than
> a=a+1
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150820/9a8e6f84/attachment-0001.html>
More information about the Python-ideas
mailing list