Re: [Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

2009-03-05 Thread Forest
On Wed, Wed, 4 Mar 2009 13:52:59 -0800, Guido van Rossum wrote: On Wed, Mar 4, 2009 at 1:44 PM, Greg Ewing greg.ew...@canterbury.ac.nz wrote: rdmur...@bitdance.com wrote: I actually like StableDict best. ?When I hear that I think, ah, the key order is stable in the face of insertions, unlike

Re: [Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

2009-03-03 Thread Forest
I'm looking forward to an ordered dictionary in the standard library, especially for things like LRU caches. I was just reading the PEP, and caught this bit: Does OrderedDict.popitem() return a particular key/value pair? Yes. It pops-off the most recently inserted new key and its corresponding

Re: [Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

2009-03-03 Thread Forest
On Tue, March 3, 2009 11:54 am, Guido van Rossum wrote: On Tue, Mar 3, 2009 at 11:20 AM, Forest list8a.for...@tibit.com wrote: Okay, but I'd also like a convenient and fast way to find the oldest entry in an OrderedDict, which I think I'd need for an LRU cache.  Skimming the current patch

Re: [Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

2009-03-03 Thread Forest
On Tue, March 3, 2009 11:20 am, Forest wrote: Okay, but I'd also like a convenient and fast way to find the oldest entry in an OrderedDict, which I think I'd need for an LRU cache. Skimming the current patch (od7.diff), I didn't notice one. Perhaps I simply missed something. Shouldn't

Re: [Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

2009-03-03 Thread Forest
Raymond Hettinger wrote: [Forest] Perhaps a new method like getfirst() would be worth while here? Guido already gave you a way to access the first item using the existing API. Using next(iter(d)) also works. Yep. I think messages are arriving out of order. -1 on my own suggestion

[Python-Dev] new ssl module is incompatible with servers that drop privileges

2008-09-09 Thread Forest
I've been trying out the new ssl module, and I love it so far, except for the way it accepts private keys and certificates. It accept them only as paths to their location on the file system, which I believe means that a server can only support SSL if it has read permission to its private key file

Re: [Python-Dev] new ssl module is incompatible with servers that drop privileges

2008-09-09 Thread Forest
On Tue, September 9, 2008 12:49 pm, Bill Janssen wrote: IMHO, this severely limits the new ssl module's utility, and discourages good security practices. Please file a bug report. A bug report with a patch and tests would be even better :-). Assign it to me. I filed one, but the bug

Re: [Python-Dev] Epoch and Platform

2008-06-17 Thread Forest
ISTR using a Microsoft C compiler in the early/mid 1990s whose runtime library used an unusual epoch. I don't recall any others straying from the Unix way, but then again, I haven't been looking for such quirks. Guido wrote: ISTR that we force the epoch to be 1970 on all major platforms -- or