Skip to content
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

A suggested change #66722

Closed
PadmanabhanTr mannequin opened this issue Oct 1, 2014 · 4 comments
Closed

A suggested change #66722

PadmanabhanTr mannequin opened this issue Oct 1, 2014 · 4 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@PadmanabhanTr
Copy link
Mannequin

PadmanabhanTr mannequin commented Oct 1, 2014

BPO 22532
Nosy @Wooble

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2014-10-01.14:49:19.682>
created_at = <Date 2014-10-01.14:27:46.892>
labels = ['interpreter-core', 'type-bug', 'invalid']
title = 'A suggested change'
updated_at = <Date 2014-10-01.16:04:25.539>
user = 'https://bugs.python.org/PadmanabhanTr'

bugs.python.org fields:

activity = <Date 2014-10-01.16:04:25.539>
actor = 'Padmanabhan.Tr'
assignee = 'none'
closed = True
closed_date = <Date 2014-10-01.14:49:19.682>
closer = 'eric.smith'
components = ['Interpreter Core']
creation = <Date 2014-10-01.14:27:46.892>
creator = 'Padmanabhan.Tr'
dependencies = []
files = []
hgrepos = []
issue_num = 22532
keywords = []
message_count = 4.0
messages = ['228073', '228076', '228080', '228081']
nosy_count = 2.0
nosy_names = ['geoffreyspear', 'Padmanabhan.Tr']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue22532'
versions = ['Python 3.4']

@PadmanabhanTr
Copy link
Mannequin Author

PadmanabhanTr mannequin commented Oct 1, 2014

Take a complex number n = 3+4j. n.real is taken as 3.0 & n.imag as 4.0 in Python3. One has to use the int(0 function to get back the parts as integers. I guess this is a compiler error?

@PadmanabhanTr PadmanabhanTr mannequin added the build The build process and cross-build label Oct 1, 2014
@Wooble
Copy link
Mannequin

Wooble mannequin commented Oct 1, 2014

From the documentation: "Complex numbers have a real and imaginary part, which are each a floating point number."

Needing to use int() to convert these floats to integers is not a bug, it's the expected behavior.

@Wooble Wooble mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error and removed build The build process and cross-build labels Oct 1, 2014
@PadmanabhanTr
Copy link
Mannequin Author

PadmanabhanTr mannequin commented Oct 1, 2014

Dear Mr SpearThanks for the prompt response & clarification.(in Python) If the real & imaginary parts of numbers you deal with are integers, results of operations (except division)  - like +, -, *, **, - appear with respective integers as real & imginary parts.  In line with these, changes in '.real' & '.imag' may be desirable?

 On Wednesday, October 1, 2014 8:19 PM, Eric V. Smith <report@bugs.python.org> wrote:

Changes by Eric V. Smith <eric@trueblade.com>:

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed


Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue22532\>


1 similar comment
@PadmanabhanTr
Copy link
Mannequin Author

PadmanabhanTr mannequin commented Oct 1, 2014

Dear Mr SpearThanks for the prompt response & clarification.(in Python) If the real & imaginary parts of numbers you deal with are integers, results of operations (except division)  - like +, -, *, **, - appear with respective integers as real & imginary parts.  In line with these, changes in '.real' & '.imag' may be desirable?

 On Wednesday, October 1, 2014 8:19 PM, Eric V. Smith <report@bugs.python.org> wrote:

Changes by Eric V. Smith <eric@trueblade.com>:

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed


Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue22532\>


@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant