[Python-Dev] Question regarding: Lib/_markupbase.py (original) (raw)
Developer Developer just_another_developer at yahoo.de
Mon Feb 11 13:16:48 CET 2013
- Previous message: [Python-Dev] _not_found attribute on ImportError
- Next message: [Python-Dev] Question regarding: Lib/_markupbase.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello all,
I was having a look at the file: Lib/_markupbase.py (@ 82151), function: "_parse_doctype_element" and have seen something that has caught my attention:
if '>' in rawdata[j:]: return rawdata.find(">", j) + 1
Wouldn't it be better to do the following? pos = rawdata.find(">", j) if pos != -1: return pos + 1
Otherwise I think we are scanning rawdata[j:] twice.
Best regards
- Previous message: [Python-Dev] _not_found attribute on ImportError
- Next message: [Python-Dev] Question regarding: Lib/_markupbase.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]