Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Python FAQ: Descriptors (veekun.com)
41 points by easonchan42 on May 25, 2012 | hide | past | favorite | 2 comments


Descriptors are among the blackest of Python's black magic, but they serve a very useful purpose. Thanks for helping to make them easier to understand.


An interesting usage of descriptors not mentioned in the article are bound methods, which turn Class.function(self, x) into instance.method(x).




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

Search: