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

complex.__format__ has incorrect default alignment #52236

Closed
ericvsmith opened this issue Feb 22, 2010 · 2 comments
Closed

complex.__format__ has incorrect default alignment #52236

ericvsmith opened this issue Feb 22, 2010 · 2 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@ericvsmith
Copy link
Member

BPO 7988
Nosy @ericvsmith

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 = 'https://github.com/ericvsmith'
closed_at = <Date 2010-02-22.19:28:15.954>
created_at = <Date 2010-02-22.16:19:02.120>
labels = ['interpreter-core', 'type-bug']
title = 'complex.__format__ has incorrect default alignment'
updated_at = <Date 2010-02-22.19:28:15.952>
user = 'https://github.com/ericvsmith'

bugs.python.org fields:

activity = <Date 2010-02-22.19:28:15.952>
actor = 'eric.smith'
assignee = 'eric.smith'
closed = True
closed_date = <Date 2010-02-22.19:28:15.954>
closer = 'eric.smith'
components = ['Interpreter Core']
creation = <Date 2010-02-22.16:19:02.120>
creator = 'eric.smith'
dependencies = []
files = []
hgrepos = []
issue_num = 7988
keywords = []
message_count = 2.0
messages = ['99773', '99816']
nosy_count = 1.0
nosy_names = ['eric.smith']
pr_nums = []
priority = 'low'
resolution = 'accepted'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue7988'
versions = ['Python 3.1', 'Python 2.7', 'Python 3.2']

@ericvsmith
Copy link
Member Author

Complex uses left alignment by default, but should use right alignment like the other numeric types.

>>> format(1+1j, '20.0')
'(1+1j)              '

>>> format(1.0, '20.0')
'               1e+00'

>>> format(1, '20')
'                   1'

@ericvsmith ericvsmith self-assigned this Feb 22, 2010
@ericvsmith ericvsmith added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Feb 22, 2010
@ericvsmith
Copy link
Member Author

Checked in:
trunk r78329
py3k r78333
release31-maint r78334

@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