

def _init_dynamic_property(self, new_attr_name, method, index=None):
    "Create new object's property at runtime. If index argument is\n        supplied it is assumed that method returns tuple() and only element\n        on ${index} position is returned.\n        "
    if ((new_attr_name in dir(self)) or (new_attr_name in self._dynamic_properties)):
        raise AttributeError(('%s class has already attribute %s.The new property could not be created.' % (self.__class__.__name__, new_attr_name)))
    new_method = self.__class__._DynamicProperty(method, index)
    inst_method = types.MethodType(new_method, self)
    method._dynamic_properties[new_attr_name] = inst_method

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/integration_tests/regions/baseregion.py BaseRegion._init_dynamic_property/VarMisuse@85/213 `self`->`method`