[issue25040] xml.sax.make_parser makes bad use of parser_list argument default value
Gautier Portet
report at bugs.python.org
Wed Sep 9 14:54:11 CEST 2015
New submission from Gautier Portet:
When using xml.sax.make_parser(), there is a potential problem with
the parser_list default value.
If another module used a default value, like the problematic parser from PyXML, your module will also use it as default parser.
You should change this:
def make_parser(parser_list = []):
by this :
def make_parser(parser_list = None):
And change the following code accordingly.
BTW, I fixed by problem by simply using xml.sax.make_parser([])
----------
components: XML
messages: 250303
nosy: Gautier Portet
priority: normal
severity: normal
status: open
title: xml.sax.make_parser makes bad use of parser_list argument default value
type: behavior
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25040>
_______________________________________
More information about the Python-bugs-list
mailing list