2009/5/1 Francesco Cosoleto cosoleto@gmail.com:
I think you should put your name instead of a generic "Pywikipedia bot team" copyright statement. A comment from original authors would be preferable though.
Well I just wanted to update the date, and I thought that a generic statement was better: in fact... why would I put my name, knowing that purodha did some important fixes on the file during those years?
Note that I'm very flexible on those attributions sections. Any suggestion in welcome, and is likely to be fine with me.
- index = 1
- while True:
- path = config.datafilepath('cache', 'pagestore' + str(index))
- if not os.path.exists(path): break
- index += 1
At least this looks nice for diskcache module too, so we can easily get rid of the imported random module and the ugly '*-abfdexjwi' like filenames.
Thinking again about this: those files are temporary, and are only accessed from one specific entry point. A tempfile would be even cleaner, right? ( http://docs.python.org/library/tempfile.html , standard since 2.3 ) I think I could do this for both diskcache and interwiki, and remove the cache/ directory. Comments?
Speaking of diskcache: I wondered if a simple Shelf ( http://docs.python.org/library/shelve.html ) wouldn't be faster than diskcache. Shelf has been written at low levels, has different interfaces for each specific system family. Naturally I would think that Shelf should be faster and more appropriate than our custom-made module, but Shelf might be too generic, and induce unnecessary overhead?
- It's also not necessary to set theses line as a Subject destructor:
these
fixed, thanks :)