[Pythonmac-SIG] pyobjc / cocoa

Just van Rossum just@letterror.com
Wed, 16 Oct 2002 09:45:52 +0200


Seth Delackner wrote:

> To expand on my previous comment in a different direction, why not:
> 
> rt = pyobjc.runtime
> 
> rt.call(obj, "message", "arg1name", arg1value, "arg2name", arg2value);
> Which would directly map to:
> [obj message arg1name:arg1value arg2name:arg2value];
> although I'll be the first to admit I have no idea how to actually 
> affect that transform.

I still know very little about ObjC, let alone pyobjc, but in my ideal would be
something like:

  obj.message(arg1name=arg1value, arg2name=arg2value)

This can't work directly, as keyword args in Python don't have an order, but I
wonder whether there is some lower level in the interpreter which would allow
the original keyword arg order to be maintained, but probably not. I'll have a
look at this when I have the time.

Just