<story><title>Understanding Python Decorators</title><url>http://stackoverflow.com/questions/739654/understanding-python-decorators/1594484#1594484</url><text></text></story><parent_chain></parent_chain><comment><author>jackowayed</author><text>Am I the only one who thinks it&apos;s a massive flaw that decorators that take args and decorators that don&apos;t are inherently different? That extra level of anonymous functions feels awful, and it&apos;s really confusing because a decorator that takes no args is @decorator whereas one that takes optional args is @decorator() if you just go with the defaults, and there is no way to make them both work.&lt;p&gt;Also, I wish they would integrate some of the stuff from this answer into the documentation, as it took me almost an hour to figure out how decorators that take arguments work and to discover that @decorator and @decorator() are irrevocably different. The documentation I found on decorators that take args was very brief. (I can&apos;t remember if I found any mention at all in the actual Python docs. I ended up learning it from mediocre, old blog posts)</text></comment>
<story><title>Understanding Python Decorators</title><url>http://stackoverflow.com/questions/739654/understanding-python-decorators/1594484#1594484</url><text></text></story><parent_chain></parent_chain><comment><author>yason</author><text>I must say that for such a simple concept as decorator, this answer surely used up all the wireframe there ever was allocated for making examples.</text></comment>