On 28/05/20 8:57 pm, Steven D'Aprano wrote:
The default value used by a parameter is certainly important, and one of
the most common reasons I call `help(func)` is to see what the default
values are. They should be in the signature, and it is an annoyance when
all the signature shows is that it is None, and then I have to trawl
through screenfuls of docs, or search the web, to find out what the
actual default is.

I think we need a real example to be able to talk about this
meaningfully.

But I'm having trouble thinking of one. I can't remember ever
writing a function with a default argument value that *has* to
be mutable and *has* to have a new one created on each call
*unless* the caller provided one.

Anyone else have one?

--
Greg
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/IK62W3TS7HKNRJO7NIQF7UYXCRVAOPVG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to