8 ms·
Python including functools.singledispatch I think is a strong indicator that function overloading IS pythonic (or at least pythonic enough to core python develo
by closed 7y ago
Python including functools.singledispatch I think is a strong indicator that function overloading IS pythonic (or at least pythonic enough to core python developers)
- joshuamorton 7y agoI don't know that I've seen singledispatch used anywhere, and the standard library includes a lot of unpythonic code (and entire modules). As a simple example, the unittest module is entirely unpythonic. Singledispatch was mostly included to handle specific cases where singledispatch is very clearly useful (the PEP mentions pprint and copy), but not as a generic tool for common end-user code.