[New-bugs-announce] [issue3866] int() doesn't 'guess'

Kent Johnson report at bugs.python.org
Sun Sep 14 13:58:06 CEST 2008


New submission from Kent Johnson <kent at kentsjohnson.com>:

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

----------
assignee: georg.brandl
components: Documentation
messages: 73214
nosy: georg.brandl, kjohnson
severity: normal
status: open
title: int() doesn't 'guess'
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3866>
_______________________________________


More information about the New-bugs-announce mailing list