def __getattribute__()

in doubles/targets/allowance_target.py [0:0]


    def __getattribute__(self, attr_name):
        """
        Returns the value of existing attributes, and returns a new allowance for any attribute
        that doesn't yet exist.

        :param str attr_name: The name of the attribute to look up.
        :return: The existing value or a new ``Allowance``.
        :rtype: object, Allowance
        """

        __dict__ = object.__getattribute__(self, '__dict__')

        if __dict__ and attr_name in __dict__:
            return __dict__[attr_name]

        caller = inspect.getframeinfo(inspect.currentframe().f_back)
        return self._proxy.add_allowance(attr_name, caller)