Re: [Python-Dev] Rationale for NamedTemporaryFile?
On Sun, 18 Mar 2007, Greg Ewing wrote: > I've just discovered the hard way that NamedTemporaryFile > automatically deletes the file when you close it. That > doesn't seem very useful to me, since surely the reason > you're using NamedTemporaryFile instead of TemporaryFile > is that you want to do something else with it afterwards? > What's the rationale for this behaviour? That annoyed me too, so I submitted a patch[1] that was recently committed. -d [1] https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1537850&group_id=5470 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Other SSL issues in the tracker have been marked
On Sun, 26 Aug 2007, Bill Janssen wrote: > This must be the call to os.system in test_ssl.py:create_cert_files(). > It's very UNIX-y. Can any bi-platform folks suggest a good > alternative to > > os.system( > "openssl req -batch -new -x509 -days 10 -nodes -config %s " > "-keyout \"%s\" -out \"%s\" > /dev/null < /dev/null 2>&1" % > (conffile, crtfile, crtfile)) > > that would be more Windows-friendly? Bundle a cert and key as part of the test? Is there a requirement to use a freshly-minted certificate each time? -d ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Adding concat function to itertools
On Fri, 28 Sep 2007, Raymond Hettinger wrote: > > Interestingly, they seem to all have something to do with dictionary > > values() that are themselves iterable. > > I see. These are instances of a recurring general use case of > chain() as a one-level flattener. > > Will give consideration to changing the signature of chain() for Py3.0. > Besides the concat() variation using a single iterable input, another > alternative is the min()/max() style signature where one input is > interpreted as iterable and multiple arguments as comprising an > input tuple. Has anyone considered making the iterator __add__ operator perform something similar to chain? I.e. list(a + b) => [ a0, a1, ... an, b0, b1, bn] (where "a" and "b" are iterables) -d ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com