'Iterate over the keys of a dictionary view or the *subviews*
of a list view.'

def __iter__(self):

    try:
        keys = self.keys()
        for key in keys:
            (yield key)
    except ConfigTypeError:
        collection = self.get()
        if (not isinstance(collection, (list, tuple))):
            raise ConfigTypeError(u'{0}    must    be    a    dictionary    or    a    list,    not    {1}'.format(self.name, type(collection).__name__))
        for index in range(len(collection)):
            (yield self[index])
