Adding attributes to instancemethods in Python
For attribute lookup, Python is automatically using the real function attached to the instance method for you. For attribute setting, it is not. They are two separate operations depending on which side of the statement you’re on, even though they both use the . operator. When you access an instance method’s __func__, you’re manually accessing … Read more