-
Notifications
You must be signed in to change notification settings - Fork 762
Closed
Labels
Description
Environment
- Pythonnet version: 2.1.0
- Python version: 2.7.10
- Operating System: Microsoft Windows 7 Professional 6.1.7601 Service Pack 1 Build 7601
Details
When calling a method with the params keyword with a single argument I get
TypeError: No method matches given arguments
To reproduce:
C#:
public class Foo
{
public void Bar(params int[] values)
{
foreach (var value in values)
{
Console.WriteLine(value);
}
}
}
Python:
foo = Foo()
foo.Bar([2,3,5,7]) # works
foo.Bar(2,3,5,7) # works
foo.Bar([5]) # works
foo.Bar(5) # TypeError: No method matches given arguments
This is probably related to the meta-issue #265.
galpin