Skip to content
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

.NET arrays bind to params arrays #892

Open
slozier opened this issue Jun 17, 2020 · 1 comment
Open

.NET arrays bind to params arrays #892

slozier opened this issue Jun 17, 2020 · 1 comment
Labels
.NET interop Issues relating to how IronPython interacts with .NET types regression

Comments

@slozier
Copy link
Contributor

slozier commented Jun 17, 2020

For example:

assert list(map(str.upper, System.Array[str](("a", "b")))) == ['A', 'B']

fails with:

TypeError: upper() takes no arguments (2 given)

The method signature is:

public Map(CodeContext context, object? func, [NotNull]params object[] iterables);

This used to work with IronPython 2 because the method signature for map was different:

public static List map(CodeContext/*!*/ context, params object[] param);
@slozier slozier added the .NET interop Issues relating to how IronPython interacts with .NET types label Jun 17, 2020
@BCSharp
Copy link
Member

BCSharp commented Nov 15, 2020

IronLanguages/dlr#249 addresses this issue at the DLR level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET interop Issues relating to how IronPython interacts with .NET types regression
Projects
None yet
Development

No branches or pull requests

2 participants