7 | | However, I've tested this, and it seems that - for whatever reason - calling `pickle.dumps` causes the the callable to be called. Therefore, the object is not serialised in a 'lazy' state - it is always 'evaluated'. And this is just the same as it currently is, except we have made it explicit. The only difference now is that `SimpleLazyObject._setupfunc` is ''never'' available now after unpickling, but that shouldn't be a problem since it is never used. |
| 7 | However, I've tested this, and it seems that - for whatever reason - calling `pickle.dumps` causes the the callable to be called. Therefore, the object is not serialised in a 'lazy' state - it is always 'evaluated'. And this is just the same as it is with the patch, except I have made it explicit. The only difference now is that `SimpleLazyObject._setupfunc` is ''never'' available now after unpickling, but that shouldn't be a problem since it is never used. |