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

string format in large number #69666

Closed
tryme mannequin opened this issue Oct 26, 2015 · 2 comments
Closed

string format in large number #69666

tryme mannequin opened this issue Oct 26, 2015 · 2 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@tryme
Copy link
Mannequin

tryme mannequin commented Oct 26, 2015

BPO 25480
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 = None
closed_at = <Date 2015-10-26.08:33:13.232>
created_at = <Date 2015-10-26.08:14:22.093>
labels = ['type-bug', 'invalid']
title = 'string format in large number'
updated_at = <Date 2015-10-26.08:33:13.229>
user = 'https://bugs.python.org/tryme'

bugs.python.org fields:

activity = <Date 2015-10-26.08:33:13.229>
actor = 'eric.smith'
assignee = 'none'
closed = True
closed_date = <Date 2015-10-26.08:33:13.232>
closer = 'eric.smith'
components = []
creation = <Date 2015-10-26.08:14:22.093>
creator = 'tryme'
dependencies = []
files = []
hgrepos = []
issue_num = 25480
keywords = []
message_count = 2.0
messages = ['253459', '253460']
nosy_count = 2.0
nosy_names = ['eric.smith', 'tryme']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue25480'
versions = ['Python 3.4']

@tryme
Copy link
Mannequin Author

tryme mannequin commented Oct 26, 2015

I am new to python and I don't know if it really is a bug. But indeed when I see sth is not right it is worthwhile to point out.

Using fresh installed ubuntu desktop with build in python3.
typing the command line by line in terminal just for learning. below is the scene
it has automatically round down. Don't know if it is limit of float.

$ python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> "hello{0:5.2f}".format(100000000000000.234)
'hello100000000000000.23'
>>> "hello{0:5.2f}".format(4111111111111111117.234)
'hello4111111111111111168.00'
>>> "hello{0:5.2f}".format(1000000000000000000.234)
'hello1000000000000000000.00'

@tryme tryme mannequin added build The build process and cross-build type-bug An unexpected behavior, bug, or error labels Oct 26, 2015
@ericvsmith
Copy link
Member

@ericvsmith ericvsmith removed the build The build process and cross-build label Oct 26, 2015
@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
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant