Message306162
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 |
|
Date |
User |
Action |
Args |
2017-11-13 16:42:10 | vstinner | set | recipients:
+ vstinner, terry.reedy, ncoghlan, rbcollins, ezio.melotti, r.david.murray, njs, Aaron.Meurer, takluyver, martin.panter, Jim.Jewett, serhiy.storchaka, The Compiler, jayvdb, mbussonn |
2017-11-13 16:42:10 | vstinner | set | messageid: <1510591330.03.0.213398074469.issue24294@psf.upfronthosting.co.za> |
2017-11-13 16:42:10 | vstinner | link | issue24294 messages |
2017-11-13 16:42:09 | vstinner | create | |
|