1 # vim: set et sts=4 sw=4 encoding=utf-8 :
3 r"Simple module that provides a validated and sequenced Item."
5 from pymin.seqtools import Sequence
6 from pymin.validatedclass import ValidatedClass
8 class Item(ValidatedClass, Sequence):
9 r"""Item() -> Item object
11 Utility class to inherit from to get validation and sequence behaviour.
13 Please see pymin.seqtools and pymin.validatedclass modules help for
18 r"""as_tuple() -> tuple - Return tuple representing the object.
20 The tuple returned preserves the validated fields declaration order.
22 return tuple([getattr(self, n) for n in self.validated_fields])