From 57802e632f5a741df6fd9b30a455c32632944489 Mon Sep 17 00:00:00 2001 From: dirkf Date: Sun, 19 Feb 2023 13:47:49 +0000 Subject: [PATCH] [jsinterp] Fix dict comprehension for Py2.6 Resolves #31600 --- youtube_dl/jsinterp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py index 60fa2b1b9..a3bc42a61 100644 --- a/youtube_dl/jsinterp.py +++ b/youtube_dl/jsinterp.py @@ -262,7 +262,7 @@ class JSInterpreter(object): if not expr: return # collections.Counter() is ~10% slower in both 2.7 and 3.9 - counters = {k: 0 for k in _MATCHING_PARENS.values()} + counters = dict((k, 0) for k in _MATCHING_PARENS.values()) start, splits, pos, delim_len = 0, 0, 0, len(delim) - 1 in_quote, escaping, skipping = None, False, 0 after_op, in_regex_char_group, skip_re = True, False, 0