Improve method binding#974
Conversation
change enumerable method to non-static add tuple test for ienumerable
|
allow_threads in methodbinder.cs Invoke is true which is causing the memory corruption. If I set it to false there is no corruption so I need to look into why. This looks like it may be new code |
Sorry, something went wrong.
lostmsu
left a comment
There was a problem hiding this comment.
I honestly think we'd be better off not introducing additional automatic conversions at this moment.
Sorry, something went wrong.
koubaa
left a comment
There was a problem hiding this comment.
I honestly think we'd be better off not introducing additional automatic conversions at this moment.
That's an acceptable position. I'll bring this PR up at tomorrow's meeting and will like to hear from the group on how to proceed
Sorry, something went wrong.
|
Not suggesting this readonly implicit conversion, what if I want to use like this void AddElem(IList<int> lst)
{
lst.add(10);
}def func():
lst = [1, 2, 3]
AddElem(lst)
# I want [1,2,3,10] actuallyI suggest implement some subclasses from List<> so you can track the changes of the collection and apply them to the Python's list |
Sorry, something went wrong.
|
@amos402 see the latest changes. I'm dealing with some crash/exception in native code but I think I'm going in the direction that you are proposing. |
Sorry, something went wrong.
|
@lostmsu since we last spoke I looked into codec and it looks like string encoding, so I'm not sure how it could apply to method binding. What is your preferred way to support non-automatic conversions for me to consider/try? |
Sorry, something went wrong.
Sorry, something went wrong.
What does this implement/fix? Explain your changes.
Two method binding changes:
Support passing lists/tuples to methods which take IEnumerable, ICollection, IList
Support passing functions to methods which take Action, Func, Task
Does this close any currently open issues?
Not that I am aware of.
Checklist
Check all those that are applicable and complete.
AUTHORSCHANGELOG