Skip to content

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

Closed
srittau wants to merge 1 commit into
python:masterfrom
srittau:float-pow
Closed

srittau wants to merge 1 commit into
python:masterfrom
srittau:float-pow

Conversation

@srittau

@srittau srittau commented Sep 11, 2018 •

Copy link
Copy Markdown
Collaborator

__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
Copy Markdown
Member

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

@srittau

srittau commented Sep 11, 2018

Copy link
Copy Markdown
Collaborator Author

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