Ed,
Since SaveNewUnchanged is not being intialized, isn't self._saveNewUnchanged
= None? 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Ed Leafe
Sent: Wednesday, June 20, 2007 1:48 PM
To: Dabo Users list
Subject: Re: [dabo-users] SaveNewUnchanged

On Jun 20, 2007, at 1:39 PM, Paul McNett wrote:

>> Shouldn’t..
>>      def _getSaveNewUnchanged(self):
>>              try:
>>                      ret = self._saveNewUnchanged
>>              except AttributeError:
>>                      ret = self._saveNewUnchanged = False
>>              return ret
>>
>> Be..
>>      def _getSaveNewUnchanged(self):
>>              try:
>>                      ret = self._saveNewUnchanged
>>              except AttributeError:
>>                      ret = False
>>              return ret
>> ?
>
> Yes, that would be better so it doesn't need to look for the missing 
> attribute each time. Do you have/want commit access to dabo to make 
> such changes yourself?

        Paul, I think you're reading his message backwards. The top version
is the current version, and it sets the attribute so that the exception is
only caught once. Larry is proposing the bottom version, which doesn't set
the attribute, and which will fire the except code each time.

        Larry, why do you think that the second version is preferable to the
first?

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to