En Mon, 28 Sep 2009 22:54:55 -0300, Peng Yu <pengyu...@gmail.com> escribió:
On Sun, Sep 20, 2009 at 12:43 PM, Benjamin Kaplan
<benjamin.kap...@case.edu> wrote:
On Sun, Sep 20, 2009 at 12:43 PM, Peng Yu <pengyu...@gmail.com> wrote:
On Sun, Sep 20, 2009 at 11:32 AM, Vijayendra Bapte
<vijayendra.ba...@gmail.com> wrote:
class A:
@echo
def __repr__(self):
pass
What does @echo mean?
It's a decorator, which wraps the function with another function
I looked at the table of content of python tutorial at
http://docs.python.org/tutorial/
But I don't see which section discuss this concept. If it is there,
would you please let me know which section I should read. Or this
concept is discussed somewhere else?
It isn't menctioned in the tutorial - look in the Glossary, or the
original PEP [1]
There's a good introduction by Bruce Eckel at [2], and the decorator
module by M. Simionato is a must [3]
[1] http://www.python.org/dev/peps/pep-0318/
[2] http://www.artima.com/weblogs/viewpost.jsp?thread=240808
[3] http://pypi.python.org/pypi/decorator
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list