-
Notifications
You must be signed in to change notification settings - Fork 750
meta-issue: overloading improvements #265
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
Comments
How about the following idea: we could reuse the work that the DLR has already done to support correct overloading resolution (for IronPython). To use that we would first convert the Python arguments to their corresponding .NET types and then let the DLR decide which of the overloads to pick. This should add support for named arguments, generic type inference, etc. |
@ArvidJB this is interesting suggestion. One problem I see is that conversion from Python to .NET types can still be ambiguous even before letting DLR to do the overloading resolution. For example, passing a float could be converted to a single or a double, passing an integer could be converted to int16, int32, or int64. Here are some comments from @matthid where he suggested to use Roslyn for this: |
@denfromufa, you haven't listed "named arguments". |
@AlexCatarino probably not, can you provide a failing case not working for you? |
Fairly specific to our API but: it silently defaults as if the named args aren't there.
In the working case the trade occurs at 4.01am; in the default case its 9.31am. |
One more method overloading issue: |
…calling C# from Python Related: pythonnet#811, pythonnet#265, pythonnet#782
…calling C# from Python Related: pythonnet#811, pythonnet#265, pythonnet#782
…tails Similar to pythonnet#900, but for constructors (reuses the same code) Related issues: pythonnet#811, pythonnet#265, pythonnet#1116
…pythonnet#900) * generate more useful message, when a .NET overload can't be found, that matches Python parameter types * provide detailed error message, when an overload can't be found when calling C# from Python Related: pythonnet#811, pythonnet#265, pythonnet#782
…tails (pythonnet#1143) Similar to pythonnet#900, but for constructors (reuses the same code) Related issues: pythonnet#811, pythonnet#265, pythonnet#1116
Uh oh!
There was an error while loading. Please reload this page.
The text was updated successfully, but these errors were encountered: