C#: in and ref parameters misinterpreted as out parameters #2630
Unanswered
nikitagrgv
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm trying to use pythonnet with a large C# codebase to expose it to python. I'm running into issues with methods that take
inparameters.Methods that take
inorrefparameters return tuples, as if they wereoutparameters. Overloaded operators that useinparameters cause exceptions.Here's a minimal repro:
MyFuncreturns a tuple containing the original return value and its argument.m1 + m2causes the following exception:As I understand it, this happens because
inandoutare C# features rather than dotnet, so pythonnet doesn’t care about it. But what can I do to fix this without rewriting any existing code?NOTE: I see in debug that this code doesn't care about
in, becausebinding.outsincludesinparameters.Beta Was this translation helpful? Give feedback.
All reactions