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

int() doesn't 'guess' #48116

Closed
kjohnson mannequin opened this issue Sep 14, 2008 · 2 comments
Closed

int() doesn't 'guess' #48116

kjohnson mannequin opened this issue Sep 14, 2008 · 2 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@kjohnson
Copy link
Mannequin

kjohnson mannequin commented Sep 14, 2008

BPO 3866
Nosy @birkenfeld, @benjaminp

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/birkenfeld'
closed_at = <Date 2008-09-14.16:02:49.903>
created_at = <Date 2008-09-14.11:58:05.768>
labels = ['docs']
title = "int() doesn't 'guess'"
updated_at = <Date 2008-09-14.16:02:49.902>
user = 'https://bugs.python.org/kjohnson'

bugs.python.org fields:

activity = <Date 2008-09-14.16:02:49.902>
actor = 'benjamin.peterson'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2008-09-14.16:02:49.903>
closer = 'benjamin.peterson'
components = ['Documentation']
creation = <Date 2008-09-14.11:58:05.768>
creator = 'kjohnson'
dependencies = []
files = []
hgrepos = []
issue_num = 3866
keywords = []
message_count = 2.0
messages = ['73214', '73227']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'kjohnson', 'benjamin.peterson']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue3866'
versions = ['Python 2.6']

@kjohnson
Copy link
Mannequin Author

kjohnson mannequin commented Sep 14, 2008

The library reference for int() says, "If radix is zero, the proper
radix is guessed based on the contents of string; the interpretation is
the same as for integer literals." The use of the word 'guess' implies
that there is some heuristic used here, that somehow the function will
look at an arbitrary number and figure out the correct radix. This can
confuse newbies:
http://mail.python.org/pipermail/tutor/2008-September/064268.html

'determined' might be a better word. For bonus points link to the
Language Reference page on integer literals:
http://docs.python.org/ref/integers.html

@kjohnson kjohnson mannequin assigned birkenfeld Sep 14, 2008
@kjohnson kjohnson mannequin added the docs Documentation in the Doc dir label Sep 14, 2008
@benjaminp
Copy link
Contributor

Thanks for the suggestion! Fixed in r66459.

@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
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

2 participants