Re: Why won't the run-time error reporter point to the error position with a caret like the syntax error reporter does? It knows exactly where the error is.

2019-07-31 Thread Terry Reedy
On 7/31/2019 11:19 PM, jsals...@gmail.com wrote: Honestly this is the only thing in over half a decade of daily python use which has disappointed me enough to want to ask the devs: print(1/) File "", line 1 print(1/) ^ SyntaxError: invalid syntax SyntaxErrors mostly com

Why won't the run-time error reporter point to the error position with a caret like the syntax error reporter does? It knows exactly where the error is.

2019-07-31 Thread jsalsman
Honestly this is the only thing in over half a decade of daily python use which has disappointed me enough to want to ask the devs: >>> print(1/) File "", line 1 print(1/) ^ SyntaxError: invalid syntax >>> print(1/1, 1/0, 1/1) Traceback (most recent call last): File "", line 1

Is there a simple way to wrap a built-in function for the whole package?

2019-07-31 Thread jfong
I get a package from Pypi. The package has many modules using built-in open() function. I like to redefine all the open() there with the default encoding 'utf-8', but not for code outside the package. Maybe I can put my def statement at the beginning of every module of this package, but just won