print( type({}) ) # <class 'dict'> print( type({1,2,3}) ) # <class 'set'>
и не только третий:
# python Python 2.7.5+ (default, Aug 4 2013, 10:07:17) [GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> {1,2,3} set([1, 2, 3])
{ 1,2,3 } - это set, это совершенно однозначно. так же однозначно,
как { k:v } это dict, [1,2,3] это list, а (1,2,3) это tuple. (а местный парсер,
грызущий диктовые скобочки к месту и не к месту - это бред какой-то.)
тут двух мнений быть не может.# pypy Python 2.7.3 (2.0.2+dfsg-4, Jun 27 2013, 23:24:30) [PyPy 2.0.2 with GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``well, it's wrong but not so "very wrong" as it looked'' >>>> {1,2,3} set([1, 2, 3])