Terry J. Reedy <tjre...@udel.edu> added the comment:
With two exceptions, nice suggestions if feasible. >>> def foo(*args=None): pass SyntaxError: * argument cannot have default value >>> def foo(**kwargs=None): pass SyntaxError: ** argument cannot have default value Good. >>> foo(*args=[0]) SyntaxError: cannot assign to iterable argument unpacking >>> foo(**args={"a": None}) SyntaxError: cannot assign to keyword argument unpacking Incomprehensible. It seems to me that these should have same message as first two; message should not depend on proposed default. ---------- nosy: +terry.reedy _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46838> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com