Re: [Zope] Re: Problem with hasattr() and Zope 2.8.1

2005-10-05 Thread Paul Winkler
Doyon, Jean-Francois said: But then, why does this code work ok? class CrosslingualSupport: Mix-in class to provide content objects with support for cross-lingual properties when needed. def clearCrosslingualAttributes(self, lang): For a given language,

Re: [Zope] Re: Problem with hasattr() and Zope 2.8.1

2005-10-05 Thread Paul Winkler
for propertyname in [ propname for propname in self.__multilingualproperties__.keys() if self.__multilingualproperties__[propname][1] == True ]: attname = '__' + propertyname + '_' + lang if hasattr(self, attname): delattr(self, attname) As you see on the

RE: [Zope] Re: Problem with hasattr() and Zope 2.8.1

2005-10-05 Thread Doyon, Jean-Francois
PROTECTED]; zope@zope.org Subject: Re: [Zope] Re: Problem with hasattr() and Zope 2.8.1 for propertyname in [ propname for propname in self.__multilingualproperties__.keys() if self.__multilingualproperties__[propname][1] == True ]: attname = '__' + propertyname + '_' + lang