On Fri, Jan 13, 2012 at 8:51 PM, Daniel Popowich
<[email protected]> wrote:
>
> With pyjamas HEAD edbefad4c3729dcd9d05f3be8e06df8aa9dfd916:
>
> I have an app that fetches data from a server via json-rpc.  The data
> is cached in the browser as a sorted list.  Of course, I can't afford
> to hold the whole database in my browser, so I delete items from the
> list if it grows beyond a certain size.  The general algorithm is:
>
>  if len(cache) > MAX:
>      if adding_to_beg_of_cache:
>        # delete from opposite (right side) of list
>        del cache[MAX:]
>      elif adding_to_end_of_cache:
>        # delete from opposite (left side) of list
>        del cache[:-MAX]
>
> The first del works, the one in the ELIF does not.  If I change the
> second del to:
>
>    del cache[:len(cache)-MAX]
>
> then it works.
>
> Attached is a demo.
>
> Is this a real issue or am I neglecting something?

 anything that doesn't work that someone is actually using is a "real issue".

 please follow the usual procedure [bugreport, testcase].

 thanks dan.

 l.

Reply via email to