[Checkins] SVN: zope.preference/trunk/src/zope/preference/preference.py using property decorators for better readability
Michael Howitz
mh at gocept.com
Thu Jan 5 13:04:14 UTC 2012
Log message for revision 123951:
using property decorators for better readability
Changed:
U zope.preference/trunk/src/zope/preference/preference.py
-=-
Modified: zope.preference/trunk/src/zope/preference/preference.py
===================================================================
--- zope.preference/trunk/src/zope/preference/preference.py 2012-01-05 12:15:24 UTC (rev 123950)
+++ zope.preference/trunk/src/zope/preference/preference.py 2012-01-05 13:04:13 UTC (rev 123951)
@@ -72,9 +72,9 @@
# the property to an actual value during binding, but because we overrode
# ``__setattr__`` this is not possible anymore.
__parent = None
+ @property
def __parent__(self):
return self.__parent or zope.component.hooks.getSite()
- __parent__ = property(__parent__)
def __bind__(self, parent):
@@ -175,6 +175,7 @@
else:
del self.__dict__[key]
+ @property
def data(self):
# TODO: what if we have multiple participations?
principal = getInteraction().participations[0].principal
@@ -190,7 +191,6 @@
prefs[self.__id__] = OOBTree()
return prefs[self.__id__]
- data = property(data)
def PreferenceGroupChecker(instance):
More information about the checkins
mailing list