FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Disable implicit conversion from float to array index by tminka · Pull Request #1363 · pythonnet/pythonnet · GitHub

Disable implicit conversion from float to array index - #1363

Merged
lostmsu merged 1 commit into
pythonnet:masterfrom
tminka:no-implicit-float-to-index
Jan 21, 2021
Merged

Disable implicit conversion from float to array index#1363
lostmsu merged 1 commit into
pythonnet:masterfrom
tminka:no-implicit-float-to-index

Conversation

tminka commented Jan 21, 2021

Copy link
Copy Markdown
Contributor

What does this implement/fix? Explain your changes.

A float value as an array index will raise an error. Fixes an oversight in #1343

Does this close any currently open issues?

The comment in #1342

Any other comments?

...

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
  • Add yourself to AUTHORS
  • Updated the CHANGELOG

Comment thread src/runtime/arrayobject.cs Outdated
return 0;
}

private static IntPtr RaiseTypeError(IntPtr idx)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

NIT: RaiseIndexMustBeIntegerError

tminka force-pushed the no-implicit-float-to-index branch from 4f18f9e to 657d675 Compare January 21, 2021 20:44
lostmsu merged commit 32fdc9c into pythonnet:master Jan 21, 2021
tminka deleted the no-implicit-float-to-index branch January 21, 2021 21:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL