Message358019
>
>
> def __init__(self):
> vars(self).setdefault('default', self.set_default())
> vars(self).setdefault('default', self.set_default())
>
This code is equivalent to
def __init__(self):
x = self.set_default()
vars(self).setdefault('default', x)
x = self.set_default()
vars(self).setdefault('default', x)
>
because the argument is evaluated before the call to setdefault() so you
can't optimise anything here. |
|
Date |
User |
Action |
Args |
2019-12-08 18:55:43 | remi.lapeyre | set | recipients:
+ remi.lapeyre, da-dada |
2019-12-08 18:55:43 | remi.lapeyre | link | issue38998 messages |
2019-12-08 18:55:43 | remi.lapeyre | create | |
|