Am 03.12.2010 23:11, schrieb Arnaud Delobelle:
OAN writes:
Hi,
i was having a problem with class attributes initiated outside of
__init__. This code is a demonstration of what i mean:
class A():
mylist = []
def __init__(self):
self.mylist.append(1)
pass
class B(A
Actually, after posting this I did some more work on the PQueue modules
I had, implementing both bisect and heapq versions. It turns out the
bisect version is heaps faster if you ever delete or re-set values in
the queue.
The problem is heapq is O(N) for finding a particular entry in the
Queue, an
LRU caches are nice and simple, but if you want something fancier, with
support for squid-like expiry models (ie, using mtime and atime to
estimate a "stale time", and IMS fetches), you can have a look at my
GCache;
http://minkirri.apana.org.au/~abo/projects/GCache
Even if you
Bengt Richter wrote:
> On 5 Sep 2005 07:27:41 -0700, "Paul McGuire" <[EMAIL PROTECTED]> wrote:
>
> >I still think there are savings to be had by looping inside the
> >try-except block, which avoids many setup/teardown exception handling
> >steps. This is not so pretty in another way (repeated whil
> Okay. This makes sense if the software is:
>
> 1) Designed by one institution.
> 2) Designed almost entirely before deployment.
> 3) Not designed to be worked on by users and
> semi-trained developers.
>
> In other words --- proprietary software.
In my experience, it doesn't work well even i