Hacker News new | past | comments | ask | show | jobs | submit login

> The use case for these magic methods might seem small, and that may very well be true. I won't spend too much more time on reflection magic methods because they aren't very important

If you want a reason to use the instancecheck magic method, the mocking of test objects is a good one. I recently came unstuck with testing Django models and mocking out DateFields, and the instancecheck method was the solution - http://tech.yunojuno.com/mocking-dates-with-django




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: