Re:A primer on Python decorators
by DasIch on Wednesday April 11, 2012 @07:45PM
(#3830226)
There is a small mistake in the post: decorators cannot be arbitrary expressions. Something like @Foo(spam).bar fails with an unhelpful SyntaxError, something that everyone who designs complex APIs will probably encounter at some point. This is a restriction which is in place because Guido didn't like arbitrary expressions as decorators.
[ Parent
| on HN ]