Skip to content

Commit

Permalink
using property decorators for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Jan 5, 2012
1 parent 1b52c54 commit 1ebea0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zope/preference/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ def __getattr__(self, key):
# Nothing found, raise an attribute error
raise AttributeError("'%s' is not a preference or sub-group." % key)

@property
def data(self):
if self.__id__ not in self.provider.data:
self.provider.data[self.__id__] = OOBTree()

return self.provider.data[self.__id__]
data = property(data)


defineChecker(DefaultPreferenceGroup, preference.PreferenceGroupChecker)

0 comments on commit 1ebea0a

Please sign in to comment.