[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