[docs] [issue13918] locale.atof documentation is missing func argument

Ezio Melotti report at bugs.python.org
Sat Mar 16 06:16:19 CET 2013

Ezio Melotti added the comment:

The function was introduced by Guido in f5b55311e79d.

I think it would have been better if atof had another name (e.g. _atof) and that atof and atoi were implemented as:

def atof(str):
    return _atof(str, float)
def atoi(str):
    return _atof(str, int)

Even better would have been to have _atof return the string without applying any function, and let e.g. atoi return int(_atof(str)).  This could have been documented publicly and used to build other functions.
However it's probably too late for such refactoring.


Python tracker <report at bugs.python.org>

More information about the docs mailing list