On Wed, Jun 11, 2008 at 2:28 PM, Ed Leafe <[EMAIL PROTECTED]> wrote:
> On Jun 11, 2008, at 3:20 PM, Nate Lowrie wrote:
>
>>       def _getShowColumnLabels(self):
>> -             return self._showColumnLabels
>> +             if hasattr(self, "_showColumnLabels"):
>> +                     v = self._showColumnLabels
>> +             else:
>> +                     v = self._showColumnLabels = True
>> +             return v
>
>        This construction is to be avoided. It is best to either: a)
> initialize the underlying attribute in the __init__() method, or b)
> use a try/except. This should only fail once and could possibly be
> called unlimited times, and hasattr() tests add up.

Well, _getShowRowLabels was constructed this way so I figured it was
standard convention...  I'll change the code for both functions.

Nate L.


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

Reply via email to