The Wayback Machine - https://web.archive.org/web/20220930073208/https://github.com/pythonnet/pythonnet/pull/1584
Skip to content
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

Disabled float and bool implicit conversions #1584

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 Oct 2, 2021
@lostmsu lostmsu requested a review from filmor Oct 2, 2021
… 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 Oct 2, 2021
@lostmsu lostmsu merged commit c9626df into pythonnet:master Oct 5, 2021
26 checks passed
@lostmsu lostmsu deleted the no-implicit-float-or-bool branch Oct 5, 2021
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.

None yet

1 participant