Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/p/y/pydicom-0.9.8/dicom/multival.py   pydicom(Download)
    def append(self, val):
        super(MultiValue, self).append(self.type_constructor(val))
    def extend(self, list_of_vals):
        super(MultiValue, self).extend((self.type_constructor(x) for x in list_of_vals))
    def insert(self, position, val):
        super(MultiValue, self).insert(position, self.type_constructor(val))
    def __setitem__(self, i, val):
        """Set an item of the list, making sure it is of the right VR type"""
        if isinstance(i, slice):
            val = [self.type_constructor(x) for x in val]
            val = self.type_constructor(val)