[Python-Dev] Silencing IO errors on del/dealloc? (original) (raw)

Daniel (ajax) Diniz ajaksu at gmail.com
Mon Feb 23 01:51:17 CET 2009


Antoine Pitrou wrote:

Guido van Rossum <guido python.org> writes:

The svn history of those lines may have more pointers. Well this code dates back to the first checkin in the py3k branch. Apparently the old p3yk branch is not there anymore...

The history is available (see below), but tells nothing that would be useful/relevant.

Daniel

History of io.py is available on ViewVC: http://svn.python.org/view/python/branches/p3yk/Lib/io.py?view=log&pathrev=56853

It's possible to checkout that as a peg revision: svn co -r54910 http://svn.python.org/projects/python/branches/p3yk/Lib/@r54910

Then, svn blame tells where it comes from: 54728 guido.van.rossum def del(self) -> None: 54728 guido.van.rossum """Destructor. Calls close().""" 54728 guido.van.rossum # The try/except block is in case this is called at program 54728 guido.van.rossum # exit time, when it's possible that globals have already been 54728 guido.van.rossum # deleted, and then the close() call might fail. Since 54728 guido.van.rossum # there's nothing we can do about such failures and they annoy 54728 guido.van.rossum # the end users, we suppress the traceback. 54728 guido.van.rossum try: 54728 guido.van.rossum self.close() 54728 guido.van.rossum except: 54728 guido.van.rossum pass

And here's the log for that rev: http://svn.python.org/view?view=rev&revision=54728



More information about the Python-Dev mailing list