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

Python decorators are like poor man's method combination.


They're a kind of advice [1]. Advice was indeed subsumed by CLOS method combination, but existed prior to that and has a life of its own, for example in Aspect Oriented Programming.

[1]: https://en.wikipedia.org/wiki/Advice_(programming)

[2]: https://en.wikipedia.org/wiki/Aspect-oriented_programming




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

Search: