[Python-Dev] Overloading comparison operator for lists
NumPy arrays have this awesome feature, where array == 3 does an
element-wise comparison and returns a list. For example:
It would be cool if Python had similar functionality for lists.
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
-------------- next part --------------
An HTML attachment was scrubbed...