Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624)
(cherry picked from commit 3f2e6f15d64d81633b1fc0b308afc0d6e9026b61)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Lib/pstats.py b/Lib/pstats.py
index 1b57d26..ded5ae5 100644
--- a/Lib/pstats.py
+++ b/Lib/pstats.py
@@ -530,7 +530,7 @@
if func in new_callers:
if isinstance(caller, tuple):
# format used by cProfile
- new_callers[func] = tuple(i[0] + i[1] for i in zip(caller, new_callers[func]))
+ new_callers[func] = tuple(i + j for i, j in zip(caller, new_callers[func]))
else:
# format used by profile
new_callers[func] += caller