If you define functions in Python, they need to have different names. Overloading functions is advised against by many people and only possible using extra packages and tricks.
Yet, there seems to be one glaring exception: the print
function. It exists without any arguments (to print just a newline character), with one argument (to print that argument followed by a newline character) and has four other optional parameters.
How come such a thing even exists in Python?
How does it work in just the base installation?
Does this mean that one can overload functions (at least with optional arguments) without the need for extra packages?