Optional Parameters from IronPython
See original GitHub issueAny idea as to why when I call a RestEase generated method from IronPython it doesn’t respect my optional query parameters?
Task<MyThing> MyMethod(
[Query] bool? param1 = null,
[Query] string param2 = null,
[Query] string param3 = null,
[Query] string param4 = null
);
It works fine from a standard C# client, but from my embedded IronPython client it tells me
MyMethod() takes exactly 4 arguments (0 given)
IronPython generally respects optional parameters and if I pass null values in it works fine.
Is there some ‘magic’ happening in the code generation that means the parameters are not actually optional in the resulting method?
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Can I use Named and Optional Arguments in ironpython
As this SO question says, the new named arguments of .NET are not supported in IronPython (which uses named arguments to constructors it...
Read more >2. Built-in Functions — IronPython 2.7.2b1 documentation
The arguments are a file name and two optional dictionaries. The file is parsed and evaluated as a sequence of Python statements (similarly...
Read more >Using Python Optional Arguments When Defining Functions
In this tutorial, you'll learn about Python optional arguments and how to define functions with default values. You'll also learn how to create...
Read more >IronPython .NET Integration
IronPython supports two ways of passing ref or out arguments to a method, an implicit way and an explicit way. In the implicit...
Read more >[Ironpython-users] Binding problem with default parameters in ...
The problem is that the method has optional parameters, but those are only declared at the interface. Now, when the class changes from...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Mind trying this build? https://ci.appveyor.com/project/canton7/restease/build/1.4.5.309/artifacts
Ah, right. I might be able to do something about that: I’ll have a look.
On 28 June 2018 15:02:08 BST, Adrian Cockburn notifications@github.com wrote: