Skip to content

bpo-29894: Deprecate returning an instance of complex subclass from __complex__ #798

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
Mar 24, 2017

Conversation

serhiy-storchaka
Copy link
Member

In a future versions of Python this can be an error.

…_complex__.

In a future versions of Python this can be an error.
@serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Mar 24, 2017
@mention-bot
Copy link

@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @brettcannon, @tim-one and @theller to be potential reviewers.

Copy link
Member

@mdickinson mdickinson left a comment

Choose a reason for hiding this comment

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

There seem to be some changes in complexobject.c that are unrelated to this PR. Apart from that, LGTM.

Py_DECREF(tmp);
return NULL;
}
assert(PyFloat_Check(tmp));
Copy link
Member

Choose a reason for hiding this comment

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

Did you intend to include this change in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

It could be included in bpo-26983, but it was not. This PR is good opportunity to make this change since it is related to complex.__new__.

Do you suggest to exclude this change from the PR and make a separate PR.

Copy link
Member

Choose a reason for hiding this comment

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

No, the change is fine. I just wasn't sure whether you'd intended to include it as part of this PR or not.

@serhiy-storchaka serhiy-storchaka merged commit 671079e into python:master Mar 24, 2017
@serhiy-storchaka serhiy-storchaka deleted the complex-exact branch March 24, 2017 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants