I can do it:
{'class': 'foo'}
But when I do this:
dict(class='foo')
I get:
File "<stdin>", line 1
{'class':}
^
SyntaxError: invalid syntax
Why can't python use a "class" like ** kwarg? It can also easily use list, int, len ... as keyword arguments.
source
to share