def __init__ ( self, trait, object, name, value ):
        self.trait      = trait
        self.object     = ref( object )
        self.name       = name
        self.name_items = None
        if trait.has_items:
            self.name_items = name + '_items'

        # Do the validated 'setslice' assignment without raising an
        # 'items_changed' event:
        if trait.minlen <= len( value ) <= trait.maxlen:
            try:
                validate = trait.item_trait.handler.validate
                if validate is not None:
                    value = [ validate( object, name, val ) for val in value ]

                list.__setitem__(self, slice(0, 0), value )

                return

            except TraitError, excp:
                excp.set_prefix( 'Each element of the' )
                raise excp

        self.len_error( len( value ) )
dataset/ETHPy150Open enthought/traits/traits/trait_handlers.py/TraitListObject.__init__/original