Skip to content

Conversation

@hamdanal
Copy link
Contributor

import cmath
class Float:
    def __float__(self): return cmath.pi
class Index:
    def __index__(self): return 1
print(cmath.rect(Float(), Index()), cmath.rect(Index(), Float()))

Outputs

(1.6974097548329732+2.643559064081456j) (-1+1.2246467991473532e-16j)

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

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.

1 participant