keep a list of read and unread items

A

a

keep a list of read and unread items

hi guys
i m building an rss reader and i want you suggestions for datastructure
for keeping read and unread list for each use
i m assuming it will be very sparse
thanks
 
A

Ant

a said:
i m building an rss reader and i want you suggestions for datastructure
for keeping read and unread list for each use
i m assuming it will be very sparse

A dictionary for each site seems to be the obvious choice, mapping the
article ID to True or False.
 
S

Stargaming

Ant said:
a wrote:




A dictionary for each site seems to be the obvious choice, mapping the
article ID to True or False.

You could also write a class, let's say RSSEntry, with attributes like
"read", "title", "author", "content", "date" and everything you need.
Another class-way would be some class like RSSFeed, being a container
holding entries like RSSFeed[0] RSSFeed[1] etc., each again with
attributes like RSSFeed[0].author.
Those class instances can be pickle'd easily, so you don't have to
bother about any database or stuff.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top