Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Disabled float and bool implicit conversions #1584

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

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

lostmsu
Copy link
Member

@lostmsu lostmsu commented Oct 2, 2021

What does this implement/fix? Explain your changes.

Disabled using __float__ during implicit conversions to .NET floating-point types. Explicit conversion is possible in Python with float(val) and .NET with (double)dynamicPyObj.

Arbitrary Python objects are no longer implicitly converted to .NET bool type.

Does this close any currently open issues?

this is a continuation of #1568

related to #1539

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Updated the CHANGELOG

@lostmsu lostmsu added this to the 3.0.0 milestone Oct 2, 2021
@lostmsu lostmsu force-pushed the no-implicit-float-or-bool branch 3 times, most recently from 26add1e to 682fcce Compare October 2, 2021 18:07
@lostmsu lostmsu requested a review from filmor October 2, 2021 18:12
… point types

arbitrary Python objects are no longer implicitly converted to .NET bool type

this is a continuation of pythonnet#1568
@lostmsu lostmsu force-pushed the no-implicit-float-or-bool branch from 682fcce to 93d4840 Compare October 2, 2021 18:14
@lostmsu lostmsu merged commit c9626df into pythonnet:master Oct 5, 2021
@lostmsu lostmsu deleted the no-implicit-float-or-bool branch October 5, 2021 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant