[Python-ideas] Optional parameters without default value
Ethan Furman
ethan at stoneleaf.us
Fri Mar 3 11:51:12 EST 2017
On 03/03/2017 06:29 AM, Victor Stinner wrote:
> An alternative for generated signature of multiple optional arguments
> is "bytearray([source[, encoding[, errors]]])", but I'm not a big fan
> of nested [...],
But that's not the same thing.
bytearry([source,] [encoding,] [errors])
says that each argument can be passed without passing any others.
bytearray([source [, encoding [,errors]]])
says that in order to pass encoding, source must also be specified.
At least, that's what it says to me.
--
~Ethan~
More information about the Python-ideas
mailing list