Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-29602: fix signed zero handling in complex constructor.#203

Merged
mdickinson merged 2 commits into
python:masterpython/cpython:masterfrom
mdickinson:fix/complex-subclass-zerosmdickinson/cpython:fix/complex-subclass-zerosCopy head branch name to clipboard
Feb 20, 2017
Merged

bpo-29602: fix signed zero handling in complex constructor.#203
mdickinson merged 2 commits into
python:masterpython/cpython:masterfrom
mdickinson:fix/complex-subclass-zerosmdickinson/cpython:fix/complex-subclass-zerosCopy head branch name to clipboard

Conversation

@mdickinson

@mdickinson mdickinson commented Feb 20, 2017

Copy link
Copy Markdown
Member

This PR, based on a patch by Serhiy Storchaka, fixes the issues with signed zeros identified in http://bugs.python.org/issue29602:

  • given a class class A(object) implementing __complex__, complex(A()) ignored the sign of a negative zero in the imaginary part
  • given a subclass class C(complex), construction of a C instance from a complex instance also ignored the sign of a negative zero in the imaginary part.

@mdickinson mdickinson merged commit 112ec38 into python:master Feb 20, 2017
@mdickinson mdickinson deleted the fix/complex-subclass-zeros branch February 20, 2017 20:28
mdickinson added a commit to mdickinson/cpython that referenced this pull request Feb 20, 2017
* Fix incorrect handling of signed zeros for complex-related classes.

* Add Misc/NEWS entry.

(cherry picked from commit 112ec38)
mdickinson added a commit to mdickinson/cpython that referenced this pull request Feb 20, 2017
* Fix incorrect handling of signed zeros for complex-related classes.

* Add Misc/NEWS entry.

(cherry picked from commit 112ec38)
mdickinson added a commit that referenced this pull request Feb 20, 2017
)

* Fix incorrect handling of signed zeros for complex-related classes.

* Add Misc/NEWS entry.

(cherry picked from commit 112ec38)
mdickinson added a commit that referenced this pull request Feb 20, 2017
)

* Fix incorrect handling of signed zeros for complex-related classes.

* Add Misc/NEWS entry.

(cherry picked from commit 112ec38)
akruis added a commit to akruis/cpython that referenced this pull request Jan 6, 2019
akruis added a commit to akruis/cpython that referenced this pull request Jan 12, 2019
jaraco pushed a commit that referenced this pull request Dec 2, 2022
jaraco added a commit to jaraco/cpython that referenced this pull request Feb 17, 2023
jaraco added a commit to jaraco/cpython that referenced this pull request Feb 17, 2023
…tion of resources from adjacent modules, even those not found in a package. Fixes python#203.
jaraco added a commit to jaraco/cpython that referenced this pull request Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.