Skip to content

Return Any from float.__(r)pow__ #2444

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

Closed
wants to merge 1 commit into from
Closed

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Sep 11, 2018

__pow__ will return a float or complex value, depending on the input
values. While float is a subtype of complex, it will be inconvenient
for callers to handle a complex return value.

Closes #1406

__pow__ will return a float or complex value, depending on the input
values. While float is a subtype of complex, it will be inconvenient
for callers to handle a complex return value.

Closes python#1406
@JelleZijlstra
Copy link
Member

@gvanrossum are you OK with this? (In the issue you preferred returning complex.)

@srittau
Copy link
Collaborator Author

srittau commented Sep 11, 2018

Whoops, I actually misread Guido's comment. I slightly prefer complex myself, and was mostly following what I thought was the consensus in the issue. Closing for now, until a consensus is reached in the issue.

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