[Pythonmac-SIG] pyobjc / cocoa
Ronald Oussoren
oussoren@cistron.nl
Wed, 16 Oct 2002 16:46:03 +0200
On Wednesday, Oct 16, 2002, at 16:12 Europe/Amsterdam, Michael Hudson
wrote:
> Bob Savage <bobsavage@mac.com> writes:
>
>> I just want to point out one more thing: because these are part of the
>> name of the method, and not truly labels, the following two methods
>> are
>> distinct:
>>
>> [obj message: arg1 withFoo: arg2];
>> [obj withFoo:arg2 message:arg1];
>>
>> Those are two different methods.
>
> But surely this isn't an issue in practice? That would be horrible!
It would be, but that is not really something we have much control
over. Currently PyObjC provides a completely transparent bridge between
Objective-C and Python, without having to interpret the meaning of the
selectors at all.
If you'd want to map [obj messageWithFoo:foo andBar:bar] onto
obj.message(foo=foo, bar=bar), the code must know about the (pretty
loose) convention of using 'with' and 'and'.
Ronald