On Tuesday, November 29, 2016 at 4:08:19 AM UTC-5, Victor Stinner wrote: > > Hi, > > Python is optimized for performance. Formatting an error message has a > cost on performances. > > Usually, when an exception is hit that will (probably) crash the program, no one cares about less than a microsecond of performance.
> I suggest you to teach your student to use the REPL and use a custom > exception handler: sys.excepthook: > https://docs.python.org/2/library/sys.html#sys.excepthook > > Using a custom exception handler, you can run expensive functions, > like the feature: "suggest len when length is used". > > The problem is then when students have to use a Python without the > custom exception handler. > > Victor > _______________________________________________ > Python-ideas mailing list > [email protected] <javascript:> > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
