python set literals should be separated by comma

This commit is contained in:
Juraj Bubniak 2013-06-29 08:22:19 +02:00
parent a6bcf5f8d7
commit c51d0ec1a7

View File

@ -228,7 +228,7 @@ empty_set = set()
some_set = set([1,2,2,3,4]) # filled_set is now set([1, 2, 3, 4])
# Since Python 2.7, {} can be used to declare a set
filled_set = {1 2 2 3 4} # => {1 2 3 4}
filled_set = {1, 2, 2, 3, 4} # => {1 2 3 4}
# Add more items to a set
filled_set.add(5) # filled_set is now {1, 2, 3, 4, 5}