summaryrefslogtreecommitdiffstats
path: root/Tools/gdb
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-05-18 14:35:54 (GMT)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>2017-05-18 14:35:54 (GMT)
commit3972628de3d569c88451a2a176a1c94d8822b8a6 (patch)
tree30627d132c42fb65f96c3d9e209b317f68d175ed /Tools/gdb
parent906f5330b9c9a74cad1cf27fddaf77e99dff9edd (diff)
downloadcpython-3972628de3d569c88451a2a176a1c94d8822b8a6.zip
cpython-3972628de3d569c88451a2a176a1c94d8822b8a6.tar.gz
cpython-3972628de3d569c88451a2a176a1c94d8822b8a6.tar.bz2
bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489)
* Replaced list(<generator expression>) with list comprehension * Replaced dict(<generator expression>) with dict comprehension * Replaced set(<list literal>) with set literal * Replaced builtin func(<list comprehension>) with func(<generator expression>) when supported (e.g. any(), all(), tuple(), min(), & max())
Diffstat (limited to 'Tools/gdb')
-rwxr-xr-xTools/gdb/libpython.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py
index 0e9df2b..cc23b84 100755
--- a/Tools/gdb/libpython.py
+++ b/Tools/gdb/libpython.py
@@ -1097,8 +1097,8 @@ class PyTupleObjectPtr(PyObjectPtr):
return ProxyAlreadyVisited('(...)')
visited.add(self.as_address())
- result = tuple([PyObjectPtr.from_pyobject_ptr(self[i]).proxyval(visited)
- for i in safe_range(int_from_int(self.field('ob_size')))])
+ result = tuple(PyObjectPtr.from_pyobject_ptr(self[i]).proxyval(visited)
+ for i in safe_range(int_from_int(self.field('ob_size'))))
return result
def write_repr(self, out, visited):