Re: [Zope-dev] ZPatterns bug with patch
"Phillip J. Eby" wrote:
try: dm = self.__dict__[_v_dm_] except KeyError: if name=='id' and val==self.__dict__['id']: return raise
Hopefully this should only perform the extra computations when the first part fails...
Are Python classes derived from DataSkin supposed to call DataSkin.__init__ ?
Anyway, perhaps this would be a small improvement:
try: dm = self.__dict__[_v_dm_] except KeyError: if (name=='id' and self.__dict__.has_key('id') and val==self.__dict__['id']): return raise
What rubbish! I didn't mean that at all! I think what I meant was this: try: dm = self.__dict__[_v_dm_] except KeyError: if name=='id': if self.__dict__.has_key('id') and val==self.__dict__.['id']: return else: self.__dict__['id']=val return raise -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
Steve Alexander wrote:
What rubbish! I didn't mean that at all!
I think what I meant was this:
try: dm = self.__dict__[_v_dm_] except KeyError: if name=='id': if self.__dict__.has_key('id') and val==self.__dict__.['id']: return else: self.__dict__['id']=val return raise
I think what I *really* meant was this: try: dm = self.__dict__[_v_dm_] except KeyError: if name=='id': if self.__dict__.has_key('id') and val==self.__dict__['id']: return else: self.__dict__['id']=val self._p_changed = 1 return raise -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
participants (1)
-
Steve Alexander