Re: [PyPerSyst-Devel] Why subclassing the root?
Brought to you by:
pobrien
|
From: <po...@or...> - 2004-02-22 22:21:48
|
Norbert Ferchen <nfe...@ba...> writes: > Hello! > > I've spend some time on PyPerSyst and was a bit frustrated about the > lack of examples. Are ther any, that I haven't found? The sandbox is your best source. Take a look at sandbox/pobrien/university or sandbox/gldnspud/djlib for examples. > But I've tried my very best and stumbled around the > Root-Class. After subclassing it, I couldn't find an method to add > my stuff on it. Why is the branch method hidden by the prefix '_'? Because it should only be used in a very careful manner. The philosophy of pypersyst is to make things as declarative as possible, and to hide things that shouldn't be publicly accessible, in order to protect the integrity of the data/objects. > I would like to add an method for __setitem__ to make the behavior > more like an dictionary. I don't think that would fit with the intent of the Root class. Take a look at the entity.root.Root class. That might help explain things. > The last thing, I stumble around with, is about the Transaction > class. Is there an pretty Ideom for writing efficient transactions? entity.transaction has generic transactions that can handle all simple inserts, updates, and deletes. -- Patrick K. O'Brien Orbtech http://www.orbtech.com Blog http://www.sum-ergo-cogito.com |