[New-bugs-announce] [issue17183] Small enhancements to Lib/_markupbase.py
Guido Reina
report at bugs.python.org
Mon Feb 11 17:11:08 CET 2013
New submission from Guido Reina:
In the file: Lib/_markupbase.py, function: "_parse_doctype_element" there is:
if '>' in rawdata[j:]:
return rawdata.find(">", j) + 1
rawdata[j:] is being scanned twice.
It would be better to do:
pos = rawdata.find(">", j)
if pos != -1:
return pos + 1
Same thing in the function: "_parse_doctype_attlist":
if ")" in rawdata[j:]:
j = rawdata.find(")", j) + 1
else:
return -1
It would be better to do:
pos = rawdata.find(")", j)
if pos != -1:
j = pos + 1
else:
return -1
----------
messages: 181903
nosy: guido
priority: normal
severity: normal
status: open
title: Small enhancements to Lib/_markupbase.py
type: enhancement
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17183>
_______________________________________
More information about the New-bugs-announce
mailing list