-
Notifications
You must be signed in to change notification settings - Fork 767
Disable implicit conversions that might lose information #1568
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
Conversation
631b019 to
c97e5ab
Compare
PyInt -> int32 .NET arrays and collections -> Python list (due to mutability)
2e8cd3f to
b2e6d4e
Compare
lostmsu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor isssues
| { | ||
| if (setError) | ||
| { | ||
| Exceptions.SetError(ex.InnerException); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be just SetError(ex)
| return true; | ||
| } | ||
| // shouldn't happen | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fallback branch should be added.
… point types arbitrary Python objects are no longer implicitly converted to .NET bool type this is a continuation of pythonnet#1568
… point types arbitrary Python objects are no longer implicitly converted to .NET bool type this is a continuation of pythonnet#1568
… point types arbitrary Python objects are no longer implicitly converted to .NET bool type this is a continuation of pythonnet#1568
… point types arbitrary Python objects are no longer implicitly converted to .NET bool type this is a continuation of pythonnet#1568
… point types arbitrary Python objects are no longer implicitly converted to .NET bool type this is a continuation of pythonnet#1568
… point types arbitrary Python objects are no longer implicitly converted to .NET bool type this is a continuation of #1568
What does this implement/fix? Explain your changes.
This removes the following conversions:
PyInt->int32(when trying to convert toobjectonly).NET arrays and collections -> Python
list(due to mutability)Additionally,
PyObjectno longer implementsIEnumerable<PyObject>, as not all python objects are iterable. Instead, a new classPyIterableis added.Checklist
CHANGELOG