A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-May/126498.html below:

[Python-Dev] PEP 443 - Single-dispatch generic functions

[Python-Dev] PEP 443 - Single-dispatch generic functionsBen Hoyt benhoyt at gmail.com
Fri May 24 00:58:01 CEST 2013
> So I am a strong +1 on allowing multiple types to be registered in one call.

Yeah, agreed. It also fits the pattern set by isinstance(), which
allows a tuple of types, like isinstance(x, (int, str)).

That said, I'm +0 on this PEP itself. It seems no one has provided
decent use-case examples (apart from contrived ones), from the stdlib
for example. In the fairly large codebase I work on, it'd only be used
in one place, and even there the PEP's approach is arguably too simple
for what we're doing. It seems to me for the few times this would be
used, direct and simple use of isinstance() would be clearer. But
maybe that's just our particular codebase.

-Ben
More information about the Python-Dev mailing list

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