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/pyast-1.0/pyast/typedlist.py   pyast(Download)
    def append(self, item):
        self.__enforceType((item,))
        return super(TypedList, self).append(item)
 
    def insert(self, pos, item):
        self.__enforceType((item,))
        return super(TypedList, self).insert(pos, item)
 
    def extend(self, items):
        self.__enforceType(items)
    def __setitem__(self, key, value):
        self.__enforceType(value if hasattr(value, '__iter__') else (value,))
        return list.__setitem__(self, key, value)
 
    def __setslice__(self, i, j, sequence):
        self.__enforceType(sequence)