Fredrik said:
Antoon Pardon wrote:
it's not a matter whether it works fine in any given version of Python,
it's a matter of whether it's *guaranteed* to work.
There are some sloppy places in the docs, though, perhaps where a
function has started out with positionals only and keyword arguments
have been added later, or it's just plain wrong. I remember an incident
a month or so ago when someone had called cgi.parse with a second
positional to retain blank values - the docs for 2.4.2 say:
parse( fp[, keep_blank_values[, strict_parsing]])
but the function signature in the code is
def parse(fp=None, environ=os.environ,
keep_blank_values=0, strict_parsing=0)
IIRC he reported this as a doc bug, though probably just too late to
make it into the initial 2.5 release. You can imagine his CGI scripts
didn't run too well with an integer as the environment ;-)
Someone with a tendency to salt every snail (that's dotting all the i's
and crossing all the t's for you English-speakers out there
could
probably do the community a service by reviewing the documented
signatures and report such discrepancies.
regards
Steve