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/2016-May/144688.html below:

[Python-Dev] Adding Type[C] to PEP 484

[Python-Dev] Adding Type[C] to PEP 484Stephen J. Turnbull stephen at xemacs.org
Sat May 21 03:49:11 EDT 2016
Sven R. Kunze writes:

 > Type[A, B] reminds me of isinstance(obj, (A, B)).

Sure, but Guido already invoked EIBTI.

For one (obscure) alternative, Type[A, B] reminded me of Fun(A,B) (the
functors from category A to category B), and in Python I would tend to
map that to a function type (taking argument from A, returning value
from B).  Another (probably more plausible to Pythonistas) would be a
type that *mixes* A and B, ie, one might be reminded of

    class C(A, B):
        pass

    isinstance(obj, C)

or even (continuing the example)

    class E(B, A, D):        # Order of A, B irrelevant!  Yikes!
        pass

    isinstance(obj, (C, E))

Regards,
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