arr.map(func)
vs. list(map(func, arr)) all(func3(y) for y in (func1(x) for x in zip(a, b)) if func2(y))
It most likely is a bit faster, but I wouldn't say it's more readable. d.get("non_existant_key", default) Array((x, y), (z, w)).index((z, w))
the following piece of code is executed bool(Array((x, y)).__eq__((z, w)))
= bool(Array(False, False))
If __bool__ returned whether the Array is nonempty, bool(Array(False, False)) would evaluate to True and the method would wrongly return 0. def __bool__(self): return self.nonEmpty
would mess up certain methods e.g. .index for nested Arrays as __eq__ is computed elementwise and bool(Array(False, False)) would evaluate to True.