NumPy arrays have this awesome feature, where array == 3 does an element-wise comparison and returns a list. For example: np.array([1,2,3,4,5])==3 returns [False,False,True,False,False] 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 certain context. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20190526/66e6b4c8/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4