Dave Abrahams <d...@boostpro.com> added the comment:

If file.close() "offers deterministic resource management," then you have to 
consider the file's open/closed state to be a resource separate from its 
existence.  A NamedTemporaryFile whose close() deterministically managed the 
open/closed state but not the existence of the file would be consistent with 
file.  That said, I understand the move toward deprecating (in the informal 
sense) cleanups that rely on GC.

I'm not suggesting breaking backward compatibility, either.  I'm suggesting 
that it might make sense to allow an explicit close-without-delete as an 
/extension/ of the current interface.  Given the move away from GC-cleanups, 
you'd probably want an explicit unlink() method as well in that case.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14243>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to