This really boils down to whether or not you (the API provider) think that None
should be a valid argument to pass to the function. Personally, in this case, I think I would use sys.float_info.max
and disallow the use of None
. After all, why should None
go about masquerading as a float
? The canonical use of None
as a default argument is when you need a mutable default argument, but that isn't the case here.
There is an argument to made for the reverse -- If you use None
, then help
will tell you that the threshold is None
, which makes some sense from a "read the code as text" perspective. (after all, you mean that there is no threshold).1
Ultimately though, it's mostly just splitting hairs at this point. Pick a convention, document it and stick with it. Don't worry about it too much.
1This is made even worse if you have auto-generated documentation (e.g. sphinx) and sys.float_info.max
doesn't return the same value on computer which generates the documentation compared to the computer which runs the code. This scenario is a pretty unlikely one -- Most computers these days agree on IEEE, but ...