コード例 #1
0
ファイル: base.py プロジェクト: gaconnet/flatland
    Unspecified,
    assignable_class_property,
    class_cloner,
    named_int_factory,
    symbol,
    )


__all__ = 'Element'

NoneType = type(None)
Root = symbol('Root')
NotEmpty = symbol('NotEmpty')

Skip = named_int_factory('Skip', True, doc="""\
Abort validation of the element & mark as valid.
""")

SkipAll = named_int_factory('SkipAll', True, doc="""\
Abort validation of the element and its children & mark as valid.

The :attr:`~Element.valid` of child elements will not be changed by skipping.
Unless otherwise set, the child elements will retain the default value
(:obj:`Unevaluated`).  Only meaningful during a decent validation.  Functions
as :obj:`Skip` on upward validation.
""")

SkipAllFalse = named_int_factory('SkipAllFalse', False, doc="""\
Aborts validation of the element and its children & mark as invalid.

The :attr:`~Element.valid` of child elements will not be changed by skipping.
コード例 #2
0
    assignable_class_property,
    class_cloner,
    named_int_factory,
    symbol,
)

__all__ = 'Element'

NoneType = type(None)
Root = symbol('Root')
NotEmpty = symbol('NotEmpty')
Unset = symbol('Unset')

Skip = named_int_factory('Skip',
                         True,
                         doc="""\
Abort validation of the element & mark as valid.
""")

SkipAll = named_int_factory('SkipAll',
                            True,
                            doc="""\
Abort validation of the element and its children & mark as valid.

The :attr:`~Element.valid` of child elements will not be changed by skipping.
Unless otherwise set, the child elements will retain the default value
(:obj:`Unevaluated`).  Only meaningful during a decent validation.  Functions
as :obj:`Skip` on upward validation.
""")

SkipAllFalse = named_int_factory('SkipAllFalse',