Skip to content

Acceptance of bool objects by complex() is not tested #102252

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
Eclips4 opened this issue Feb 25, 2023 · 1 comment
Closed

Acceptance of bool objects by complex() is not tested #102252

Eclips4 opened this issue Feb 25, 2023 · 1 comment
Assignees
Labels
type-feature A feature request or enhancement

Comments

@Eclips4
Copy link
Member

Eclips4 commented Feb 25, 2023

Such operations as complex(False) == 0j is not covered by test_bool.py

Linked PRs

@Eclips4 Eclips4 added the type-feature A feature request or enhancement label Feb 25, 2023
Eclips4 added a commit to Eclips4/cpython that referenced this issue Feb 25, 2023
@terryjreedy terryjreedy changed the title Acceptance bool objects by complex object is not tested by test_bool.py Acceptance of bool objects by complex() is not tested Feb 25, 2023
@terryjreedy terryjreedy self-assigned this Feb 25, 2023
@terryjreedy
Copy link
Member

terryjreedy commented Feb 25, 2023

Since isinstance(False, int) == True and False == 0, complex(False) must be complex(0) unless specifically excepted. But looking at the other tests, the addition is reasonable and will take minimal time.

terryjreedy pushed a commit that referenced this issue Feb 25, 2023
Add tests for conversion from bool to complex.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 25, 2023
Add tests for conversion from bool to complex.
(cherry picked from commit 4197043)

Co-authored-by: Eclips4 <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 25, 2023
Add tests for conversion from bool to complex.
(cherry picked from commit 4197043)

Co-authored-by: Eclips4 <[email protected]>
miss-islington added a commit that referenced this issue Feb 25, 2023
Add tests for conversion from bool to complex.
(cherry picked from commit 4197043)

Co-authored-by: Eclips4 <[email protected]>
miss-islington added a commit that referenced this issue Feb 25, 2023
Add tests for conversion from bool to complex.
(cherry picked from commit 4197043)

Co-authored-by: Eclips4 <[email protected]>
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

No branches or pull requests

2 participants