Trees | Index | Help |
|
---|
Package zope :: Package schema :: Module _field :: Class DottedName |
|
object
--+ |Element
--+ |Attribute
--+ |Field
--+ |object
--+ | | |MinMaxLen
--+ |Bytes
--+ |BytesLine
--+ | DottedName
Dotted name field.
Values of DottedName fields must be Python-style dotted names.
Method Summary | |
---|---|
| |
| |
fromUnicode(self,
value)
| |
Inherited from BytesLine | |
| |
Inherited from Field | |
| |
| |
| |
| |
| |
| |
| |
Inherited from Element | |
Returns the documentation for the object. | |
Returns the name of the object. | |
Returns the value associated with 'tag'. | |
Returns a list of all tags. | |
Returns the value associated with 'tag'. | |
Associates 'value' with 'key'. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Class Variable Summary | |
---|---|
Inherited from BytesLine | |
Implements |
__implemented__ = <implementedBy zope.schema._field.Byte...
|
ClassProvides |
__provides__ = <zope.interface.declarations.ClassProvide...
|
Inherited from MinMaxLen | |
ClassProvides |
__providedBy__ = <zope.interface.declarations.ClassProvi...
|
FieldProperty |
max_length = <zope.schema.fieldproperty.FieldProperty ob...
|
FieldProperty |
min_length = <zope.schema.fieldproperty.FieldProperty ob...
|
Inherited from Field | |
object |
_Field__missing_value_marker = <object object at 0xb7e6e...
|
NoneType |
_type = None |
NoneType |
context = None |
ValidatedProperty |
default = <zope.schema._bootstrapfields.ValidatedPropert...
|
FieldProperty |
description = <zope.schema.fieldproperty.FieldProperty o...
|
NoneType |
missing_value = None |
int |
order = 285 |
FieldProperty |
readonly = <zope.schema.fieldproperty.FieldProperty obje...
|
FieldProperty |
required = <zope.schema.fieldproperty.FieldProperty obje...
|
FieldProperty |
title = <zope.schema.fieldproperty.FieldProperty object ...
|
Inherited from Attribute | |
NoneType |
interface = None |
Method Details |
---|
__init__(self,
*args,
**kw)
|
_validate(self, value)>>> dotted_name = DottedName(__name__='test') >>> dotted_name.validate("a.b.c") >>> dotted_name.validate("a") >>> dotted_name.validate(" a") Traceback (most recent call last): ... InvalidDottedName: a >>> dotted_name = DottedName(__name__='test', min_dots=1) >>> dotted_name.validate('a.b') >>> dotted_name.validate('a.b.c.d') >>> dotted_name.validate('a') Traceback (most recent call last): ... InvalidDottedName: ('too few dots; 1 required', 'a') >>> dotted_name = DottedName(__name__='test', max_dots=0) >>> dotted_name.validate('a') >>> dotted_name.validate('a.b') Traceback (most recent call last): ... InvalidDottedName: ('too many dots; no more than 0 allowed', 'a.b') >>> dotted_name = DottedName(__name__='test', max_dots=2) >>> dotted_name.validate('a') >>> dotted_name.validate('a.b') >>> dotted_name.validate('a.b.c') >>> dotted_name.validate('a.b.c.d') Traceback (most recent call last): ... InvalidDottedName: ('too many dots; no more than 2 allowed', 'a.b.c.d') >>> dotted_name = DottedName(__name__='test', max_dots=1, min_dots=1) >>> dotted_name.validate('a.b') >>> dotted_name.validate('a') Traceback (most recent call last): ... InvalidDottedName: ('too few dots; 1 required', 'a') >>> dotted_name.validate('a.b.c') Traceback (most recent call last): ... InvalidDottedName: ('too many dots; no more than 1 allowed', 'a.b.c') |
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Jun 24 12:01:23 2005 | http://epydoc.sf.net |