License
reordering the imports (I read it was better to let python 3 as default mode)
The test assumed the returned elements would come in the same order as given, which does not need to happen in a dictionary (unsorted collection).
Optimized __bool__ with the MAX way to be faster