STINNER Victor <victor.stin...@gmail.com> added the comment: If you consider that the REPL is designed for developers, I would also suggest to show ResourceWarning by default.
I'm not sure of that since I like to write crappy code of REPL (and I hope that nobody logs my keyboard)! Example: haypo@selma$ python3 Python 3.6.2 (default, Oct 2 2017, 16:51:32) >>> open("/etc/issue").read() '\\S\nKernel \\r on an \\m (\\l)\n\n' I may be annoyed by a ResourceWarning warning here, since it's a oneliner written to be only run once. I know that my code is crappy, but I also know that it works well and it's much shorter to write than "with open(..) as fp: fp.read()" :-) Yet another approach: I proposed to add a "developer mode", -X dev option: https://mail.python.org/pipermail/python-dev/2017-November/150514.html ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue24294> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com