-
Notifications
You must be signed in to change notification settings - Fork 750
Enable C# objects to be callable #890
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
Milestone
Comments
lostmsu
added a commit
to losttech/pythonnet
that referenced
this issue
Jun 20, 2019
…ethod are callable in Python pythonnet#890
lostmsu
added a commit
to losttech/pythonnet
that referenced
this issue
Jun 20, 2019
lostmsu
added a commit
to losttech/pythonnet
that referenced
this issue
Jun 24, 2019
…e also callable now A test case added to CallableObject.cs When tp_call is invoked for a custom .NET class, and __call__ is not implemented in .NET, walk the class hierarchy (as seen from Python) until Python class is found. Then try to invoke its __call__ method, if defined. pythonnet#890
lostmsu
added a commit
to losttech/pythonnet
that referenced
this issue
Oct 6, 2021
Implemented by adding tp_call to ClassBase, that uses reflection to find __call__ methods in .NET, and falls back to invoking __call__ method from Python base classes. fixes pythonnet#890 this is an amalgamation of d46878c, 5bb1007, and 960457f from https://github.com/losttech/pythonnet
lostmsu
added a commit
to losttech/pythonnet
that referenced
this issue
Oct 6, 2021
Implemented by adding tp_call to ClassBase, that uses reflection to find __call__ methods in .NET, and falls back to invoking __call__ method from Python base classes. fixes pythonnet#890 this is an amalgamation of d46878c, 5bb1007, and 960457f from https://github.com/losttech/pythonnet
3 tasks
lostmsu
added a commit
to losttech/pythonnet
that referenced
this issue
Oct 6, 2021
Implemented by adding tp_call to ClassBase, that uses reflection to find __call__ methods in .NET, and falls back to invoking __call__ method from Python base classes. fixes pythonnet#890 this is an amalgamation of d46878c, 5bb1007, and 960457f from https://github.com/losttech/pythonnet
lostmsu
added a commit
to losttech/pythonnet
that referenced
this issue
Oct 6, 2021
Implemented by adding tp_call to ClassBase, that uses reflection to find __call__ methods in .NET, and falls back to invoking __call__ method from Python base classes. fixes pythonnet#890 this is an amalgamation of d46878c, 5bb1007, and 960457f from https://github.com/losttech/pythonnet
lostmsu
added a commit
to losttech/pythonnet
that referenced
this issue
Oct 6, 2021
Implemented by adding tp_call to ClassBase, that uses reflection to find __call__ methods in .NET, and falls back to invoking __call__ method from Python base classes. fixes pythonnet#890 this is an amalgamation of d46878c, 5bb1007, and 960457f from https://github.com/losttech/pythonnet
lostmsu
added a commit
to losttech/pythonnet
that referenced
this issue
Oct 7, 2021
Implemented by adding tp_call to ClassBase, that uses reflection to find __call__ methods in .NET fixes pythonnet#890 this is an amalgamation of d46878c, 5bb1007, and 960457f from https://github.com/losttech/pythonnet
lostmsu
added a commit
to losttech/pythonnet
that referenced
this issue
Oct 7, 2021
Implemented by adding tp_call to ClassBase, that uses reflection to find __call__ methods in .NET fixes pythonnet#890 this is an amalgamation of d46878c, 5bb1007, and 960457f from https://github.com/losttech/pythonnet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Details
Given C# class
Callable
Be able call an instance of it like a function in Python:
Expected: should print 42
Actual: TypeError : object is not callable
Note
I am actually working on this. This is a tracking issue to reference in commits.
The text was updated successfully, but these errors were encountered: