
July 2, 2005
7:35 a.m.
"Ralf W. Grosse-Kunstleve" <rwgk@cci.lbl.gov> wrote in message news:200507020319.j623JAUu311991@boa.lbl.gov...
I'd also be happy with
def __init__(self, self.x, self.y, self.z):
which wouldn't be too different from unpacking tuples
If you are willing to require that the args be passed as a tuple (extra pair of parens) I believe you could do def __init__(s, args): s.x, s.y, s.z = args This even checks for correct number of actual args. I believe part of your underlying point is that you do not (usually) in this type of situation really need or want the args to be separately named locals since you just want to attach them to the instance. (Way too late, may have made an error.) Terry J. Reedy