-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial method argument order #453
Comments
Is this a problem you're having with an actual API? If so - which one? I'm a little surprised that Apple would construct an API where the argument order is the discriminator between method forms. Regardless, I think you've missed another possible option for implementation. ObjCPartial currently uses In fact, we might even be able to combine this with a fix for #148 - using a literal |
I think this is only if I implement such methods myself. I understand such a situation won't be a problem in almost cases. Its priority would be low. By the way, I thought the use of |
The use of And yes, the Interestingly, the code includes a reference to the exact behavior you're describing here - along with a TODO to clean it up once Python 3.6 is deprecated :-) |
Thank you. That seems to be true. |
Fixed by #462. |
What is the problem or limitation you are having?
As described in #26, when there is an Objective-C class that has
someMethod:arg1:arg2:
andsomeMethod:arg2:arg1:
methods...These call the same method (
someMethod:arg1:arg2:
). This seems to be because partial methods only store a single order of arguments.Describe the solution you'd like
Allow them to be distinguished. (Then non-existent argument orders may no longer be allowed.) The argument names of partial methods are stored using dictionaries whose keys are
frozenset
. And, the values of the dictionaries are like(selector string, [argument1 name, argument2 name, ...])
. In this case, storing multiple selectors and lists may be a solution.Describe alternatives you've considered
Store no argument names. Then, use
respondsToSelector:
inObjCPartialMethod
to check if the method of specified name exists. (I feel there are some other ways...)Additional context
No response
The text was updated successfully, but these errors were encountered: