[Python-Dev] PEP 443 - Single-dispatch generic functions
Łukasz Langa
lukasz at langa.pl
Fri May 24 16:13:37 CEST 2013
On 24 maj 2013, at 14:53, Ronan Lamy <ronan.lamy at gmail.com> wrote:
>> 2013/5/24 Łukasz Langa <lukasz at langa.pl>
>>
>> I recognize the need for such behaviour to be discoverable. This is
>> important for debugging purposes. This is why I'm going to let users
>> inspect registered overloads, as well as provide their own mapping
>> for the registry. I'm working on the reference implementation now,
>> stay tuned.
>
> OK, I agree that preventing silent overwriting is actually not desirable. Specifying an interface for the implementation registry sounds like the best possible solution to my concerns.
Users can now inspect the dispatcher and specify their own mapping for
a registry:
http://hg.python.org/features/pep-443/file/tip/Lib/functools.py#l359
Documentation:
http://hg.python.org/features/pep-443/file/tip/Doc/library/functools.rst#l189
ABC support is still not there, I'm working on it.
--
Best regards,
Łukasz Langa
WWW: http://lukasz.langa.pl/
Twitter: @llanga
IRC: ambv on #python-dev
More information about the Python-Dev
mailing list