]> granicus.if.org Git - python/commitdiff
Mention in the int() docstring that a base zero has meaning, as
authorGustavo Niemeyer <gustavo@niemeyer.net>
Wed, 10 Jan 2007 16:13:40 +0000 (16:13 +0000)
committerGustavo Niemeyer <gustavo@niemeyer.net>
Wed, 10 Jan 2007 16:13:40 +0000 (16:13 +0000)
stated in http://docs.python.org/lib/built-in-funcs.html as well.

Objects/intobject.c

index 8aa8d0b39c3fe991c33943d1fa02ad5fdddb2d15..dedc4776baf8e65052d91c448ae5666ce46d84a6 100644 (file)
@@ -1070,8 +1070,9 @@ Convert a string or number to an integer, if possible.  A floating point\n\
 argument will be truncated towards zero (this does not include a string\n\
 representation of a floating point number!)  When converting a string, use\n\
 the optional base.  It is an error to supply a base when converting a\n\
-non-string. If the argument is outside the integer range a long object\n\
-will be returned instead.");
+non-string. If base is zero, the proper base is guessed based on the\n\
+string content.  If the argument is outside the integer range a\n\
+long object will be returned instead.");
 
 static PyNumberMethods int_as_number = {
        (binaryfunc)int_add,    /*nb_add*/