Skip to content

Failure in function selection according to parameters #226

Description

@uenz

Hi,
until pythonnet 2.1.0 it was possible to call functions with the same name and different parameters. This fails with pythonnet 2.1.0
I have prepared minimal test functions like this, which return the input para string as string, int or float:
public String Function(String para, ref String myout)
public String Function(String para,ref int myout)
public String Function(String para,ref float myout)

and call them like this
from Test import TestClass
dummy=TestClass()

print dummy.Function('Echo',str())
print dummy.Function('42',int())
print dummy.Function('3.144',float())

With pythonnet==2.0.0 the result is as expected
(u'Echo', u'Echo')
(u'42', 42.0)
(u'3.144', 3.144)

pythonnet==2.1.0 returns a TypeError: No method matches given arguments

I have a sample dll and py as a zip, but unfortunately the upload fails.
(Unfortunately, we don’t support that file type. )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions