Question
Specify None as default value for Boolean function argument?
The prototype for numpy.histogram
contains an input argument density
of type bool
and default value None
. If the caller does not supply density
, what value does it take on?
The closest Q&A that I can find is this. The first answer says "Don't use False
as a value for a non-bool
field", which doesn't apply here. It also says that bool(x)
returns False
, but that doesn't assure the caller that the function will set density
to False
if it isn't provided. Is this a mistake in the documentation of the prototype for numpy.histogram
, or am I missing something about the documentation convention?
The other answers to the above Q&A do not seem relevant to my question.