Author Tim Chambers
Recipients Tim Chambers, brycenesbitt, eli.bendersky, jjmiller50, martin.panter, pocek, rhettinger, scoder
Date 2017-11-02.08:33:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509611610.98.0.213398074469.issue18304@psf.upfronthosting.co.za>
In-reply-to
Content
I suggest adding the option to keep the namespace prefixes in the tree when reading in (will it need to set a tree wide variable for the instance?). I haven't looked at the etree internals in detail.

Add a function to ElementTree that returns the tag using the namespace prefix (eg. treenode.tagpre). Namespaces and prefixes are cached and used to expand the prefix only when absolutely required. Some XML/xpath search operations currently assume the full expanded namespaces not prefixes which may lead to side-effects.
You can leave the default behaviour for compatibility.
Using prefixes in the tree storage and searches would reduce memory and CPU time (when no expansion is required).
History
Date User Action Args
2017-11-02 08:33:31Tim Chamberssetrecipients: + Tim Chambers, rhettinger, scoder, eli.bendersky, martin.panter, brycenesbitt, pocek, jjmiller50
2017-11-02 08:33:30Tim Chamberssetmessageid: <1509611610.98.0.213398074469.issue18304@psf.upfronthosting.co.za>
2017-11-02 08:33:30Tim Chamberslinkissue18304 messages
2017-11-02 08:33:30Tim Chamberscreate