
wildemar at freakmail
Sep 12, 2006, 1:34 PM
Post #1 of 1
(105 views)
Permalink
|
|
Ideas on interconnecting objects? (was: "filtered view" upon lists?)
|
|
> That's all very well, but you might want to Google for "YAGNI". :) > You still haven't given us mcuh of a clue about the real need. There is no "real need". I'm trying things, looking what works out eventually. I don't do that for a living (if I did, I'd be starved by now). Or do you mean the real use case? Because that I did do. There really isn't anything more to it. Ok, maybe there is (though I still think it boils down to what I have said before): I have objects, called Ideas. Ideas have IDs, used as primary keys in a berkeley database. I want to connect them with connections that have a 'type', may or may not have a 'direction' and may or may not have a 'context'. I want to avoid storing the connections as separate database objects (lets for now just accept that). So I decided to store connections as lists of tuples inside Ideas: [(ID, type, direction, context), (ID, type, direction, context), ...] Those I want to Filter. I'll gladly take any advice on how to do it better; mind you however that the only data structure the db is supposed to deal with is the 'Idea'. Again: I find this hard to explain, so I should probably rethink the whole thing. ;) wildemar -- http://mail.python.org/mailman/listinfo/python-list
|