
May 2, 2022
1:17 p.m.
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