This is because some changes in the LLVM compiler explained in the Xcode 5.1Release Notes:
The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options are currently specified.
Projects using invalid compiler options will need to be changed to remove those options. To help ease that transition, the compiler will temporarily accept an option to downgrade the error to a warning:
When we need to convert certain elements from an iterable object, generator, etc. to a list or set, it is possible to do it in just one line thanks to the list an set comprehensions. Lets consider the following list of dictionaries.
This is a simple way to delete duplicated elements from a list in Python when the order is not important.
>>> l = [1, 2, 2, 3, 4, 1, 3, 5, 6]
[1, 2, 2, 3, 4, 1, 3, 5, 6]
>>> l = list(set(l))
[1, 2, 3, 4, 5, 6]
In this case, we’re converting our list to a set data structure and take advantage of its “non duplicate elements” property. Then, we convert that object into a list again in order to have the initial data structure but with unique items in it.