Hacker News new | ask | show | jobs
by the_mitsuhiko 5004 days ago
Don't do this. Your implementation does not work if someone invokes the dscriptor's __get__ by hand which is not uncommon. My implementation takes the shortcut but also still does the correct thing if you keep a reference to the property object.