You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any other reliable way to know that an object has definitively been saved at least once, besides the fact that it has a _p_mtime? That's what our code uses it for.
It's a convenience, in that case, that _p_mtime activates the object. If it did not, code like this:
ifobj._p_mtime:
# we've been saved beforeelse:
# we're a brand new object, do first-time stuff
has to become:
obj._p_activate()
ifobj._p_mtime:
# ...
...
Could that code be changed everywhere? Sure. Would it be moderately annoying and an easily-missed source of bugs? Sure.
I believe the consensus answer is "Yes, _p_mtime must activate the object." I don't know that we every got the rationale documented, but #20 makes it so for pure-Python.
The C implementation does forcibly activate it, while the pure-Python version (until #20) did not.
See: #20
The text was updated successfully, but these errors were encountered: