From 344417db950d6e816ab2efb21737c2bdf9d1ad53 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Sun, 19 Jan 2014 14:17:10 +0400 Subject: Modernize the code now that Python 2.5 is no longer supported - Use print function instead of print statement; - Use new exception handling; - Use in operator instead of has_key(); - Do not use tuple arguments in functions; - Other miscellaneous improvements. This is based on output of `futurize --stage1`, with some manual corrections. --- sphinx/util/matching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sphinx/util/matching.py') diff --git a/sphinx/util/matching.py b/sphinx/util/matching.py index b4c71076..61059c7c 100644 --- a/sphinx/util/matching.py +++ b/sphinx/util/matching.py @@ -77,4 +77,4 @@ def patfilter(names, pat): if pat not in _pat_cache: _pat_cache[pat] = re.compile(_translate_pattern(pat)) match = _pat_cache[pat].match - return filter(match, names) + return list(filter(match, names)) -- cgit v1.2.1