def __setattr__(self, name, value): """See zope.i18n.interfaces.locales.ILocaleInheritance""" # If we have a value that can also inherit data from other locales, we # set its parent and name, so that we know how to get to it. if (ILocaleInheritance.providedBy(value) and not name.startswith('__')): value.__parent__ = self value.__name__ = name super(AttributeInheritance, self).__setattr__(name, value)
def __setitem__(self, name, value): """See zope.i18n.interfaces.locales.ILocaleInheritance""" if ILocaleInheritance.providedBy(value): value.__parent__ = self value.__name__ = name super(InheritingDictionary, self).__setitem__(name, value)