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

Love using Python, but still haven't got around to using decorators yet. I probably didn't understand the concept properly until now ...


You could say decorators are for the code that you want to put inside a function but that don't really belong to its logic. The memoization example shows that: if you have memoization logic inside the function it works but you should feel that there are two disjoint logics at works.




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

Search: