def _sequence_field(checked_class, suffix, item_type, optional, initial):
 class TheType(checked_class, ):
  __type__ = item_type
 TheType.__name__ = (item_type.__name__.capitalize() + suffix)
 if optional:
  def factory(argument):
   if (argument is None):
    return None
   else:
    return TheType(argument)
 else:
  factory = TheType
 return field(type=(optional_type(TheType) if optional else TheType), factory=factory, mandatory=True, initial=factory(initial))

def _sequence_field ( checked_class , suffix , item_type , optional , initial ) : class TheType ( checked_class , ) : __type__ = item_type TheType . __name__ = ( item_type . __name__ . capitalize ( ) + suffix ) if optional : def factory ( argument ) : if ( argument is None ) : return None else : return TheType ( argument ) else : factory = TheType return field ( type = ( optional_type ( TheType ) if optional else TheType ) , factory = factory , mandatory = True , initial = factory ( initial ) )
create checked field for either pset or pvector .