Module zope.schema.accessors
Field accessors
Accessors are used to model methods used to access data defined by
fields. Accessors are fields that work by decorating existing
fields.
To define accessors in an interface, use the accessors function:
class IMyInterface(Interface):
getFoo, setFoo = accessors(Text(title=u'Foo', ...))
getBar, = accessors(TextLine(title=u'Foo', readonly=True, ...)
Normally a read accessor and a write accessor are defined. Only a
read accessor is defined for read-only fields.
Read accessors function as access method specifications and as field
specifications. Write accessors are solely method specifications.
$Id: accessors.py,v 1.2 2005/06/24 16:52:59 nyergler Exp $
Function Summary |
|
accessors(field)
|