Patrick Mullen a écrit : (snip) > Still an unnecessary lookup on tmp though :) And it would be useless > to use it for one assignment, the idea is to eliminate all the typing > with this: > > self.var1 = 5 > self.var2 = "a value" > self.var3 = stuff > self.var4 = [2,54,7,7] > self.var5 = "dingaling" > self.var6 = 6.4 > self.var7 = 1 > self.var8 = False > self.var9 = True
self.__dict__.update(dict(var1=5, var2="a value", var3 = stuff, <etc>)) Someone else ? Or are we done with this DeadHorse ? -- http://mail.python.org/mailman/listinfo/python-list