Message358043
my use case is different (I do a loop), but what I expected from the docs (just for fun!)
class Ddefault:
def __init__(self):
vars(self).setdefault('default', self.set_default() if not 'default' in vars(self) else self.default)
vars(self).setdefault('default', self.set_default() if not 'default' in vars(self) else self.default)
print(vars(self))
def set_default(self):
print(vars(self))
return 'default'
if __name__ == "__main__":
Ddefault()
may be the coding diverted from the docs after the fixing of issue 13521 and no one dares correcting..
anyway, I will probably keep my old coding (performance, if there is any) |
|
Date |
User |
Action |
Args |
2019-12-09 00:45:34 | da-dada | set | recipients:
+ da-dada, eric.smith, remi.lapeyre |
2019-12-09 00:45:34 | da-dada | set | messageid: <1575852334.14.0.94512504443.issue38998@roundup.psfhosted.org> |
2019-12-09 00:45:34 | da-dada | link | issue38998 messages |
2019-12-09 00:45:33 | da-dada | create | |
|