Gustavo Niemeyer wrote: > Is special syntax in the language really required in this case, > considering you're already doing something "fairly magic" anyways? The syntax is not special for the specific application (Objective-C), but special for a class of applications (modifications of/annotations to the subsequent function). > What is objc.signature() doing? I'm only guessing here: it declares an Objective-C signature (i.e. a type) of the function. This is probably necessary for thunking. I can't see a way to do that in a comprehensible way without a decorator. It applies to the function, and it probably needs to wrap the function. So without a special syntax, it would have to go after the function. This is counter-intuitive, as the Objective-C signature has to correspond (I guess) with the Python signature, so it is desirable that they are closely together. It might be possible to put that annotation into the __doc__ string, but that would be abusing doc strings, and might be more error-prone. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4