Python - curly braces in type hints

Viewed 1057

What do these mean?

 def f(a: {int, float}):
    pass

I've seen this syntax used in some standard Python modules when fetching documentation via PyCharm, and I have no idea what it means. What's the hinted type for a in my example? What types can I pass to this function?

The particular example where I've seen this is in tkinter's Frame __init__ method, where the master parameter is of type {tk, _w}.

1 Answers
Related