News for hackers. Stuff that matters.
Re:Using attrs for everything in Python by wcummings on Thursday August 25, 2016 @03:31PM (#12361782)
>I think its safe to say that the current view of what decorators do is, a) filter things going to functions (so they error, or hit a cache), or b) register a function with another library (e.g. flask path decorator)

Why is it safe to say that? Aren't decorators just syntax for higher-order functions?

Re:Using attrs for everything in Python by RubyPinch on Thursday August 25, 2016 @05:50PM (#12362774)
its "safe" to say that, like its also "safe" to say that <article> will be used to denote articles in HTML

Yes, decorators can do whatever they want, but, in practical usage I'd say a majority of decorator usages do not mutate the class/function significantly from its original typed-out intent (like, they don't often add 8+ methods to a class for example, but of course they can)

not literally "safe" to say.