A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-August/028010.html below:

[Python-Dev] Re: multimethods (quelle horreur?) (clarification)

[Python-Dev] Re: multimethods (quelle horreur?) (clarification)Samuele Pedroni pedroni@inf.ethz.ch
Sun, 18 Aug 2002 11:59:03 +0200
[David Abrahams]
>
>[myself]
>> gf(a,b,_redispatch=(None,SuperTypeOf_b))
>>
>> the dispatch mechanism will consider the
>> tuple (type(a),SuperTypeOf_b) instead
>>  of (type(a),type(b)) for dispatching.
>
>More "sugarily:"
>
>    gf(a, dispatch_as(b, SuperTypeOf_b))
>
>Interesting. Not sure how I feel about this.
>
>>  This is the moral equivalent of
>>  single dispatching:
>>
>>  SuperTypeOf_b.meth(b)

what I described above corresponds
to this.

>>
>>  or super(SuperTypeOf_b).meth(b)

to be quivalent with that

gf(a, dispatch_as(b, SuperTypeOf_b))

would have to consider
SuperType_Of_b but together with
the order induced by type(b).mro().

regards.




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