是否 declarePrivate() 等。人。Zope 2 风格的访问控制声明有任何现代 Python 语法方法装饰器吗?
例如
class EncryptedField(StringField):
"""
"""
security = ClassSecurityInfo()
# Something more nice here? like @private?
security.declarePrivate('get')
def get(self, instance, **kwargs):
value = ObjectField.get(self, instance, **kwargs)
if getattr(self, 'raw', False):
return value