Serhiy Storchaka added the comment:

> Since I wrote tokenize.open(), I can explain why I chose to import builtins 
> :-)

Then it is good to me.

> I would prefer something like traceback_ignore_linecache_error.patch, perhaps 
> combined with a new function that would tell you whether the interpreter is 
> shutting down.

I think we can apply both solutions. Keeping a reference to open will make 
traceback more usable at exit and ignoring exception will make it more robust 
in worst case.

And I support the idea about public function or attribute that would tell you 
whether the interpreter is shutting down. This would be useful in many modules. 
But this is different issue.

----------

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

Reply via email to