Hi,

I've a list of python objects with dates attributes. This list is ordered
by one of these date. Elements mandatory follow each other :

Element #1                   Element #2           Element #3
|-------------------------|--------------|--------------------------|

Now, I want to "insert" an element in this timeline. This imply that I will
have to resize some elements :

Element #1                   Element #2           Element #3
|-------------------------|--------------|--------------------------|
                New element
          |----------------------|

And after resize :

Element #1      New element       Element #2       Element #3
|---------|----------------------|---------|--------------------------|

          |----------------------|

My question is the following : how can I know (easily) which elements my
"New element" is "over", which,
in my example would have returned ['Element #1', 'Element #2'].

Elements objets are simple Python objects with dates :

obj.begin = datetime()
obj.end = datetime()

I'm looking for the more Pythonic way to handle this problem, thanks !
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to