Michael Lohmann wrote:
class Ethel(Aardvark, Clever): """Ethel is a very clever Aardvark""" def __init__(self): super().__init__(quantity="some spam", cleverness=1000))
>>
if you want to instantiate an Aardvark directly there is NO WAY EVER that you could give him ANY kwargs. So why should the __init__ indicate something else?
You seem to want the signature of Ethel.__init__ to indicate exactly what arguments it can accept. But even with your proposed feature, that isn't going to happen. It will only show arguments that appear explicitly in Ethel.__init__'s argument list. If it didn't override the default value for cleverness, you would never know that it was a possible parameter. In situations like this there's no substitute for hand-written documentation, and that can include explaining what is allowed for **kwds. -- Greg _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/