4 ms·
As the article mentions - the big advantage of decorators is Python 2.x compatibility. (not that I want to start another discussion of THAT topic) EDIT - looks
by andybak 13y ago
As the article mentions - the big advantage of decorators is Python 2.x compatibility. (not that I want to start another discussion of THAT topic)
EDIT - looks like obiwan will allow decorators as well as annotations. I do prefer the syntax of typedecorator though. It seems less cluttered.
- andreasvc 13y agoIt's a matter of taste. I think the decorator approach looks more bolted-on and ad hoc. I prefer C style declarations over annotations, though, because they have the least amount of noise.