creating new objects with references to them

Steve Holden steve at
Thu Nov 2 18:58:30 CET 2006

JohnJSal wrote:
> Steve Holden wrote:
>>     del rec[7]
> Hmmm, but what if the record can remain open, changes can be made, and
> then saved again to the same object? I suppose it isn't necessary to
> delete them, right? Man, this stuff gets complicated....
Right. Of course, once you've written a record to the database for the 
first time you need a flag to tell you it exists so that further changes 
are made with UPDATE statements. But ultimately it's just a matter of 
synchronizing the contents of an internal data structure with the 
contents of a set of windows (typically dialogs) and a database.

Another option is to use an object-relational mapper like SQLObject or 
SQLalchemy to hide most of the database ferkling.

The complexity is known as "real life". Get used to it ;-)

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd
Skype: holdenweb
Recent Ramblings

More information about the Python-list mailing list