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

Support reverse binary operations by christabella · Pull Request #1 · christabella/pythonnet · GitHub

Repository navigation

Support reverse binary operations - #1

Open
christabella wants to merge 1 commit into
feat/operator-overloadsfrom
feat/reverse-operator
Open

christabella wants to merge 1 commit into
feat/operator-overloadsfrom
feat/reverse-operator

Conversation

Copy link
Copy Markdown
Owner

What does this implement/fix? Explain your changes.

Reverse operator methods

Does this close any currently open issues?

...

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 on lines +378 to +386
// Postprocessing to extend margs.
var margsTemp = new object[2];
// If forward, the bound instance is the left operand.
int boundOperandIndex = isForward ? 0 : 1;
// If forward, the passed instance is the right operand.
int passedOperandIndex = isForward ? 1 : 0;
margsTemp[boundOperandIndex] = co.inst;
margsTemp[passedOperandIndex] = margs[0];
margs = margsTemp;

Copy link
Copy Markdown

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

What about unary operators (e.g. -a, !a)?

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