Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.




It'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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: