Re: [Python-ideas] singledispatch for methods

March 27, 2019
8:28 a.m.
The motivation is the same as for functools.singledispatch ( https://www.python.org/dev/peps/pep-0443/) - provide generic methods. These are useful for visitor implementations that are cleaner than the visit_<class_name> approach typically used today (e.g. https://github.com/mbr/visitor). It is also useful for writing serialisers and encoders. The motivation is also that people keep using the method name munging approach (e.g. mypy) because functools.singledispatch only works on functions and not class methods. Cheers Tim On Wed, Mar 27, 2019 at 4:33 PM Michael Selik <michael.selik@gmail.com> wrote:
2184
Age (days ago)
2184
Last active (days ago)
0 comments
1 participants
participants (1)
-
Tim Mitchell