[issue30485] Element.findall(path, dict) doesn't insert null namespace

Stefan Behnel report at bugs.python.org
Sun Apr 14 15:07:17 EDT 2019


Stefan Behnel <stefan_ml at behnel.de> added the comment:

The script seems to generally assume that "" is a good representation for "no prefix", i.e. the default namespace, although that is IMHO more correctly represented as None. It's not very likely that this is the only script out there that makes that assumption.

In fact, this might not be an entirely stupid assumption, given that None doesn't sort together with strings, for example. And sorting prefixes is not an unusual thing to do.

That makes it a case of "practicality beats purity", I guess …

I'll change the implementation to allow empty strings.

----------
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30485>
_______________________________________


More information about the Python-bugs-list mailing list