From 3972628de3d569c88451a2a176a1c94d8822b8a6 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 18 May 2017 07:35:54 -0700 Subject: bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489) * Replaced list() with list comprehension * Replaced dict() with dict comprehension * Replaced set() with set literal * Replaced builtin func() with func() when supported (e.g. any(), all(), tuple(), min(), & max()) --- Lib/inspect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/inspect.py') diff --git a/Lib/inspect.py b/Lib/inspect.py index 3317f58f47..9c072eb074 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -389,7 +389,7 @@ def classify_class_attrs(cls): mro = getmro(cls) metamro = getmro(type(cls)) # for attributes stored in the metaclass - metamro = tuple([cls for cls in metamro if cls not in (type, object)]) + metamro = tuple(cls for cls in metamro if cls not in (type, object)) class_bases = (cls,) + mro all_bases = class_bases + metamro names = dir(cls) -- cgit v1.2.1