class Foo(Mapping):

    def __iter__(self):
        yield 'a'
yield 'b'

def __len__(self):
    return 2

def __getitem__(self, item):
    return ord(item)
f = Foo()
Custom double star operator for a class?