Lennart Regebro wrote:
Just a note: I don't think mixing in persistance is needed.
Hmm... how so? I've always thought it quite nice that when, for example, you store the modification time of an object in a DateTime, you can safely update it without worrying about the whole object having to be repickled when you change it...
CalZope uses datetime objects straight off the rocks, (as attributes to SimpleItems) and they persist just fine. :-)
Yes, they will, but that's not the point ;-)
There is no default timezone implementation, though. Zope3 has one I think, so it could be used.
Yes, I'd verymuch like to see Zope 2 and 3 end up with the same datetime and timezone story, but one that does involve persistence... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
On 11/29/05, Chris Withers <chris@simplistix.co.uk> wrote:
Hmm... how so? I've always thought it quite nice that when, for example, you store the modification time of an object in a DateTime, you can safely update it without worrying about the whole object having to be repickled when you change it...
Oh, so that make a difference? datetime objects are unchangeable, so everytime you change it you will have to set the attribute, and I thought the whole object got pickled then, but I guess that it doesn't, then. I that case, a persistance-aware datetime could be beneficial. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/
Chris Withers wrote:
Just a note: I don't think mixing in persistance is needed.
Hmm... how so? I've always thought it quite nice that when, for example, you store the modification time of an object in a DateTime, you can safely update it without worrying about the whole object having to be repickled when you change it...
Except that this doesn't work that way today. DateTime object don't subclass persistent. What you're proposing doesn't make much sense to me anyway, if you want to change the modification time of an object then it means something else changed. No need to isolate the modification time change in its own persistent subobject. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com fg@nuxeo.com
participants (3)
-
Chris Withers -
Florent Guillaume -
Lennart Regebro