Naftali Harris added the comment:
Adding Georg, who is listed as an expert for the traceback module
(https://docs.python.org/devguide/experts.html).
--
nosy: +georg.brandl
___
Python tracker
<http://bugs.python.org/issue29
Naftali Harris added the comment:
For your convenience, here is a possible patch fixing these issues. It modifies
the format_exception_only function in the traceback module to follow the
behavior of the interpreter a little more closely for SyntaxError's. Feel free
to use, in whole, in
Naftali Harris added the comment:
Two other minor discrepancies between the way traceback and the interpreter
format SyntaxError's, in 2.7.13:
1.
>>> e = SyntaxError("some message", ("myfile.py", None, None, None))
>>> raise e
Traceback (mo
New submission from Naftali Harris:
The traceback documentation states that it "exactly mimics the behavior of the
Python interpreter when it prints a stack trace." Here's a small case where it
doesn't, on 2.7.13:
~/repos/Python-2.7.13$ cat example.py
def f(x):
glo
Naftali Harris added the comment:
Oh, ok, that makes a lot of sense. Thanks for the clear and patient
explanation, Tim! Sorry to have bothered the Python bug tracker with this.
--Naftali
--
resolution: -> invalid
status: open -> closed
___
New submission from Naftali Harris:
Hi everyone,
It appears that if you use a global variable in a function that you pass to
Pool.map, but modify that global variable after instantiating the Pool, then
the modification will not be reflected when Pool.map calls that function.
Here's a