Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-30 Thread Armin Rigo
Hi Jeff, On Mon, Apr 29, 2013 at 11:58 PM, Jeff Allen ja...py@farowl.co.uk wrote: In Jython, (...) Thanks Jeff for pointing this out. Jython thus uses a custom mechanism similar to PyPy's, which is also similar to atexit's. It should not be too hard to implement it in CPython 3 as well, if

Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-30 Thread Nikolaus Rath
Armin Rigo ar...@tunes.org writes: Hi Jeff, On Mon, Apr 29, 2013 at 11:58 PM, Jeff Allen ja...py@farowl.co.uk wrote: In Jython, (...) Thanks Jeff for pointing this out. Jython thus uses a custom mechanism similar to PyPy's, which is also similar to atexit's. It should not be too hard to

Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-29 Thread Armin Rigo
Hi Nikolaus, On Sat, Apr 27, 2013 at 4:39 AM, Nikolaus Rath nikol...@rath.org wrote: It's indeed very informative, but it doesn't fully address the question because of the _pyio module which certainly can't use any custom C code. Does that mean that when I'm using x = _pyio.BufferedWriter(), I

Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-29 Thread Antoine Pitrou
Le Mon, 29 Apr 2013 16:42:38 +0200, Armin Rigo ar...@tunes.org a écrit : Hi Nikolaus, On Sat, Apr 27, 2013 at 4:39 AM, Nikolaus Rath nikol...@rath.org wrote: It's indeed very informative, but it doesn't fully address the question because of the _pyio module which certainly can't use any

Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-29 Thread Jeff Allen
On 29/04/2013 15:42, Armin Rigo wrote: On Sat, Apr 27, 2013 at 4:39 AM, Nikolaus Rath nikol...@rath.org wrote: It's indeed very informative, but it doesn't fully address the question because of the _pyio module which certainly can't use any custom C code. Does that mean that when I'm using x =

Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-29 Thread Nikolaus Rath
Armin Rigo ar...@tunes.org writes: Hi Nikolaus, On Sat, Apr 27, 2013 at 4:39 AM, Nikolaus Rath nikol...@rath.org wrote: It's indeed very informative, but it doesn't fully address the question because of the _pyio module which certainly can't use any custom C code. Does that mean that when

Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-26 Thread Nikolaus Rath
Guido van Rossum gu...@python.org writes: On Monday, April 15, 2013, Nikolaus Rath wrote: Brian Curtin br...@python.org javascript:; writes: On Fri, Apr 12, 2013 at 12:04 AM, Nikolaus Rath nikol...@rath.orgjavascript:; wrote: [ Note: I already asked this on

Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-26 Thread Guido van Rossum
There are no guarantees in life. On the other hand: Don't worry, be happy. On Fri, Apr 26, 2013 at 7:39 PM, Nikolaus Rath nikol...@rath.org wrote: Guido van Rossum gu...@python.org writes: On Monday, April 15, 2013, Nikolaus Rath wrote: Brian Curtin br...@python.org javascript:; writes: On

Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-15 Thread Nikolaus Rath
Brian Curtin br...@python.org writes: On Fri, Apr 12, 2013 at 12:04 AM, Nikolaus Rath nikol...@rath.org wrote: [ Note: I already asked this on http://stackoverflow.com/questions/15917502 but didn't get any satisfactory answers] Sorry, but that's not a reason to repost your question to this

Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-15 Thread Guido van Rossum
You got your snswer 16 hours ago on S.O. On Monday, April 15, 2013, Nikolaus Rath wrote: Brian Curtin br...@python.org javascript:; writes: On Fri, Apr 12, 2013 at 12:04 AM, Nikolaus Rath nikol...@rath.orgjavascript:; wrote: [ Note: I already asked this on

[Python-Dev] Destructors and Closing of File Objects

2013-04-11 Thread Nikolaus Rath
[ Note: I already asked this on http://stackoverflow.com/questions/15917502 but didn't get any satisfactory answers] Hello, The description of tempfile.NamedTemporaryFile() says: , | If delete is true (the default), the file is deleted as soon as it is | closed. ` In some

Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-11 Thread Brian Curtin
On Fri, Apr 12, 2013 at 12:04 AM, Nikolaus Rath nikol...@rath.org wrote: [ Note: I already asked this on http://stackoverflow.com/questions/15917502 but didn't get any satisfactory answers] Sorry, but that's not a reason to repost your question to this list. If you have to ask somewhere else,