'Type-restricted list'

def test07_allowed_types(self):

    (pl, ul) = self.lists_of_len()
    ul._allowed = (int, long)
    ul[1] = 50
    ul[:2] = [60, 70, 80]
    def setfcn(x, i, v):
        x[i] = v
    self.assertRaises(TypeError, setfcn, ul, 2, 'hello')
    self.assertRaises(TypeError, setfcn, ul, slice(0, 3, 2), ('hello', 'goodbye'))
