[Pyobjc-dev] Why syntax?
Brought to you by:
ronaldoussoren
From: Andrew Z. <az...@we...> - 2001-04-12 20:11:21
|
This is probably a dumb question, but there isn't much of an archive on this topic (since there's really only been two people posting...) Why does PyObjC mangle method names, instead of using named parameters? I understand why it's done that way for the Java bridge - Java is an inferior language. But why for Python? I'd like to see: win.initWithContentRect_styleMask_backing_defer_ (frame, 15, 2, 0) become win.init(contentRect=frame, styleMask=15, backing=2, defer=0) If you've looked at Jython, it does a lot to "pythonify" java methods and classes - it lets you specify thing that look like bean properties in constructors, for instance, and makes things that look like properties available as attributes. It would be nice to do similar things for the PyObjC module, to make it as Pythonic as possible... This seems really obvious, however, so I'm sure there's a reason why it hasn't been done. Please enlighten. |