[Zope3-checkins] SVN: Zope3/trunk/src/zope/configuration/fields.py
Fixed a typo. Removed trailing spaces.
Marius Gedminas
marius at pov.lt
Mon Jul 19 08:35:31 EDT 2004
Log message for revision 26621:
Fixed a typo. Removed trailing spaces.
Changed:
U Zope3/trunk/src/zope/configuration/fields.py
-=-
Modified: Zope3/trunk/src/zope/configuration/fields.py
===================================================================
--- Zope3/trunk/src/zope/configuration/fields.py 2004-07-19 11:39:19 UTC (rev 26620)
+++ Zope3/trunk/src/zope/configuration/fields.py 2004-07-19 12:35:31 UTC (rev 26621)
@@ -52,7 +52,7 @@
... field._validate(value)
>>>
>>> from zope import schema
- >>>
+ >>>
>>> for value in (u'3foo', u'foo:', u'\\', u''):
... try:
... field._validate(value)
@@ -68,14 +68,14 @@
def fromUnicode(self, u):
return u.strip()
-
+
def _validate(self, value):
super(PythonIdentifier, self)._validate(value)
if pyidentifierPattern.match(value) is None:
raise schema.ValidationError(value)
class GlobalObject(schema.Field):
- """An object that can be accesses as a module global
+ """An object that can be accessed as a module global.
Examples:
@@ -139,7 +139,7 @@
value = self.context.resolve(name)
except ConfigurationError, v:
raise schema.ValidationError(v)
-
+
self.validate(value)
return value
@@ -180,7 +180,7 @@
InvalidToken: ('zope', (<type 'int'>, <type 'long'>)) in z y
>>> gg.fromUnicode("y y")
[42, 42]
- >>>
+ >>>
"""
implements(IFromUnicode)
@@ -199,7 +199,7 @@
values.append(v)
else:
values = []
-
+
self.validate(values)
return values
@@ -219,7 +219,7 @@
>>> class FauxContext(object):
... def path(self, p):
... return os.path.join(os.sep, 'faux', 'context', p)
-
+
>>> context = FauxContext()
>>> field = Path().bind(context)
@@ -242,8 +242,8 @@
>>> n = field.fromUnicode(p)
>>> n.split(os.sep)
[u'', u'faux', u'context', u'a', u'b']
-
+
"""
implements(IFromUnicode)
@@ -252,7 +252,7 @@
u = u.strip()
if os.path.isabs(u):
return os.path.normpath(u)
-
+
return self.context.path(u)
@@ -291,7 +291,7 @@
>>> class Info(object):
... file = 'file location'
... line = 8
-
+
>>> class FauxContext(object):
... i18n_strings = {}
... info = Info()
@@ -312,7 +312,7 @@
>>> import warnings
>>> realwarn = warnings.warn
>>> warnings.warn = fakewarn
-
+
>>> i = field.fromUnicode(u"Hello world!")
>>> i
u'Hello world!'
More information about the Zope3-Checkins
mailing list