There are two obvious issues with the set literal syntax:
my_set = {'foo', 'bar', 'baz'}
-
It’s not available before Python 2.7
-
There’s no way to express an empty set using that syntax (using
{}creates an empty dict)
Those may or may not be important to you.
The section of the docs outlining this syntax is here.