[Checkins] SVN: zope.schema/trunk/src/zope/schema/_bootstrapfields.py pep8
Godefroid Chapelle
gotcha at bubblenet.be
Mon Nov 30 06:22:26 EST 2009
Log message for revision 106110:
pep8
Changed:
U zope.schema/trunk/src/zope/schema/_bootstrapfields.py
-=-
Modified: zope.schema/trunk/src/zope/schema/_bootstrapfields.py
===================================================================
--- zope.schema/trunk/src/zope/schema/_bootstrapfields.py 2009-11-30 11:21:26 UTC (rev 106109)
+++ zope.schema/trunk/src/zope/schema/_bootstrapfields.py 2009-11-30 11:22:26 UTC (rev 106110)
@@ -28,6 +28,7 @@
from zope.schema._schema import getFields
+
class ValidatedProperty(object):
def __init__(self, name, check=None):
@@ -42,6 +43,7 @@
inst.validate(value)
inst.__dict__[name] = value
+
class Field(Attribute):
# Type restrictions, if any
@@ -235,7 +237,6 @@
# and max.
self.default = default
-
def _validate(self, value):
super(Orderable, self)._validate(value)
@@ -268,6 +269,7 @@
if self.max_length is not None and len(value) > self.max_length:
raise TooLong(value, self.max_length)
+
class Text(MinMaxLen, Field):
"""A field containing text used for human discourse."""
_type = unicode
@@ -294,6 +296,7 @@
self.validate(str)
return str
+
class TextLine(Text):
"""A text field with no newlines."""
More information about the checkins
mailing list