some kind of LFU dict...

2005-01-28 Thread Joh
Hello, (first i'm sorry for my bad english...) for a program, i need to have some kind of dictionary which will contain a huge amount of keys and values. i have tried 'to do it simple' using a normal dict but when available memory was exhausted, my computer started to be really slow as it swap-ed

need help on generator... (re)

2005-01-24 Thread Joh
hello, thanks to all who replied to my post (2005-01-21) - (i can not post inside the original thread as i get "Unable to retrieve message [EMAIL PROTECTED]" from googlenews :( > Do you mean: > [1,2], [2,3], [3,4], [1,2,3], [2,3,4], [1,3,4] > (E.g. all elements in the power set except the empty s

need help on generator...

2005-01-21 Thread Joh
hello, i'm trying to understand how i could build following consecutive sets from a root one using generator : l = [1,2,3,4] would like to produce : [1,2], [2,3], [3,4], [1,2,3], [2,3,4] but unfortunately can not, i guess i can do it by using sub generator and maybe enumerate, please if you h