Intermediate
Swift
Q81 / 100
What is the @dynamicCallable attribute?
Correct! Well done.
Incorrect.
The correct answer is B) Allows a type to be called like a function by implementing dynamicallyCall(withArguments:) or withKeywordArguments:
B
Correct Answer
Allows a type to be called like a function by implementing dynamicallyCall(withArguments:) or withKeywordArguments:
Explanation
@dynamicCallable struct PythonObject { func dynamicallyCall(withKeywordArguments: [String: Any]) -> PythonObject } enables obj(x: 1, y: 2) call syntax.
Progress
81/100