
Understanding Python decorators - spoon16
http://stackoverflow.com/questions/739654/understanding-python-decorators
======
mkramlich
this is RTFM material and i wish i could downvote it

~~~
weaksauce
I don't think that it is quite RTFM material. I looked at the documentation on
decorators in the python manual(actually there was only passing mention in the
manual it was fleshed out in the pep3129) and it is fairly lacking. Sure it
describes how the decorators operate in a syntactical sense it does not
provide the motivation for them or the examples that this stack overflow
question answers.

~~~
mkramlich
Understood. YMMV. However, I have a couple books on Python, plus the official
docs, plus Google, plus the REPL shell, and between those I found more than
ample information on how they work and what they're useful for.

I hope we don't reach a point here on HN where the home page is filled with
questions like, "How do 'for' loops work in C?" because that would make my K&R
C book cry, among other things. :)

~~~
weaksauce
I think decorators are a bit different than for loops but I get your gist :)

I think this article is fine for HN for a few reasons:

1\. Not all python programmers know about decorators and they might not be
sufficiently motivated to search them out.

2\. Decorators do not have obvious utility after reading python's manual.

3\. HN commentary is usually more interesting than the article and the
submitter might have wanted to spark some debate on the utility of them.

4\. This answer is a good example of a well written(mostly, there were some
grammatical errors but overall good) through explanation that was succinct
without being too succinct and leaving out important details.

