On 23/04/2019 15:52, Arup Rakshit wrote:
> If I replace __getattr__ with __getattribute__ I found the program works
> exactly same. Now my questions is in real world when you have to pick
> between these 2 pair of special method which protocols a Python dev
> checks to pick either of the one?
Arup Rakshit wrote:
> I read today 2 methods regarding the customizing the attribute
> access:__getattr__ and __getattribute__ from
> https://docs.python.org/3/reference/datamodel.html#special-method-names.
> What I understood about them is that __getattr__ is called when the
> requested attribute
On Tue, Apr 23, 2019 at 08:22:56PM +0530, Arup Rakshit wrote:
> I read today 2 methods regarding the customizing the attribute
> access:__getattr__ and __getattribute__ from
> https://docs.python.org/3/reference/datamodel.html#special-method-names.
> What I understood about them is that __getatt
I read today 2 methods regarding the customizing the attribute
access:__getattr__ and __getattribute__ from
https://docs.python.org/3/reference/datamodel.html#special-method-names.
What I understood about them is that __getattr__ is called when the
requested attribute is not found, and an Attri