__rcall__???

Tres Seaver tseaver at starbase.neosoft.com
Sun Dec 19 22:49:16 EST 1999


In article <002101bf4a98$01eda860$922d153f at tim>,
Tim Peters <tim_one at email.msn.com> wrote:
>[David C. Ullrich]
>>     So why isn't there a magic __rcall__, that would go with
>> __call__ like the other __rop__'s go with __op__?
>>
>>     It seems useful to me to allow x to alter the way f behaves
>> when you call f(x); ...
>
>Probably for the same reason there's no __rgetitem__ for the benefit of the
>millions of programmers who want
>
>    x[i]
>
>to use x as an index into sequence i <wink>.  That is, AFAIK nobody ever
>asked for it before, and it's not screamingly natural (you're not really
>*surprised* at the lack of __rcall__, right?).

Smells like Visitor/multimethods/DoubleDispatch to me, and it _is_ a vacuum
which people code around, in most languages except Lisp and its progenty;
David is apparently the first to propose this particular solution
(quite Pythonic, it seems to me, only adding slots to the jump
table is not likely to win wide support).

>better-hope-for-santa-to-do-it-cuz-i-doubt-guido-will-ly y'rs  - tim

Looking-hopefully-for-sinterklaas'ly,

Tres.
-- 
---------------------------------------------------------------
Tres Seaver           tseaver at palladion.com       713-523-6582
Palladion Software    http://www.palladion.com



More information about the Python-list mailing list