pyobjc icon indicating copy to clipboard operation
pyobjc copied to clipboard

Investigate options to make python_method optional

Open ronaldoussoren opened this issue 6 years ago • 0 comments

Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).


Options:

  1. “python_method” when the method name doesn’t match the “selector” pattern
  2. Add “objc_method” and a global and/or per-class to switch the default

Goal is to make writing code more natural, currently classes contain to many python_method decorators when mixing Python and ObjC code.

I’m leaning toward option 1, although I’m slightly worried that this makes it to easy to accidentally create a python_method. Longer term it might be better to switch the default and require the use of an objc_method decorator to register objc methods.

ronaldoussoren avatar Nov 06 '19 15:11 ronaldoussoren