1# test passing a user-defined mapping as the argument to **
2
3def foo(**kw):
4    print(sorted(kw.items()))
5
6class Mapping:
7    def keys(self):
8        # the long string checks the case of string interning
9        return ['a', 'b', 'c', 'abcdefghijklmnopqrst']
10
11    def __getitem__(self, key):
12        if key == 'a':
13            return 1
14        else:
15            return 2
16
17foo(**Mapping())
18