<div dir="ltr">NumPy arrays have this awesome feature, where array == 3 does an element-wise comparison and returns a list. For example:<div><br></div><div>np.array([1,2,3,4,5])==3</div><div><br></div><div>returns</div><div><br></div><div>[False,False,True,False,False]</div><div><br></div><div>It would be cool if Python had similar functionality for lists.</div><div><br></div><div>If that is not possible, perhaps we could consider allowing developers to overload operators on built-in types within the context of a project or module. For example, an overload in one module would have no effect on the same operator in a different module (such as any Python standard modules.) Additionally, let's then give the developers the option to explicitly import an overload from other modules. So, people could develop a module with the  purpose of providing overloads that make complete sense within a certain context.</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div><img><div> </div></div></div></div></div>