summaryrefslogtreecommitdiffstats
path: root/Lib/xml/sax
diff options
context:
space:
mode:
authorAndrés Delfino <adelfino@gmail.com>2018-10-26 14:56:57 (GMT)
committerTal Einat <taleinat+github@gmail.com>2018-10-26 14:56:57 (GMT)
commita6dc531063efe3a8d47ff4639729060c72a3688c (patch)
tree25f8f3c4a7883783103a4c6d73ee117aa50dc187 /Lib/xml/sax
parent10cb3760e8631a27f5db1e51b05494e29306c671 (diff)
downloadcpython-a6dc531063efe3a8d47ff4639729060c72a3688c.zip
cpython-a6dc531063efe3a8d47ff4639729060c72a3688c.tar.gz
cpython-a6dc531063efe3a8d47ff4639729060c72a3688c.tar.bz2
bpo-34789: make xml.sax.make_parser accept iterables of all types (GH-9576)
Diffstat (limited to 'Lib/xml/sax')
-rw-r--r--Lib/xml/sax/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/xml/sax/__init__.py b/Lib/xml/sax/__init__.py
index 13f6cf5..a0f5d40 100644
--- a/Lib/xml/sax/__init__.py
+++ b/Lib/xml/sax/__init__.py
@@ -67,15 +67,15 @@ if sys.platform[:4] == "java" and sys.registry.containsKey(_key):
default_parser_list = sys.registry.getProperty(_key).split(",")
-def make_parser(parser_list = []):
+def make_parser(parser_list=()):
"""Creates and returns a SAX parser.
Creates the first parser it is able to instantiate of the ones
- given in the list created by doing parser_list +
- default_parser_list. The lists must contain the names of Python
+ given in the iterable created by chaining parser_list and
+ default_parser_list. The iterables must contain the names of Python
modules containing both a SAX parser and a create_parser function."""
- for parser_name in parser_list + default_parser_list:
+ for parser_name in list(parser_list) + default_parser_list:
try:
return _create_parser(parser_name)
except ImportError as e: