On Sun, May 01, 2022 at 06:22:08PM -0700, Devin Jeanpierre wrote: > Is it unreasonable to instead suggest generalizing the assignment target > for parameters? For example, if parameter assignment happened left to > right, and allowed more than just variables, then one could do: > > def __init__(self, self.x, self.y): pass
What would this do? def __init__(self, spam.x, eggs.y): pass Would it try to assign to variables spam and eggs in the surrounding scopes? How about this? def __init__(self, x, x.y): pass -- Steve _______________________________________________ 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/WDRZ7QYQWXCL3QTV4YVIL2YUAS4DNK7I/ Code of Conduct: http://python.org/psf/codeofconduct/