diff options
author | Guido van Rossum <guido@python.org> | 2001-02-05 19:17:50 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-02-05 19:17:50 (GMT) |
commit | 9e1fe1ec675386a4be12471a8b785a385d326316 (patch) | |
tree | cbfae533f02034be9fd49cfa36ba1e8115face1c /Lib/test/tokenize_tests.py | |
parent | 795ad56b319daa610766327b99a74e5ba1ae41b2 (diff) | |
download | cpython-9e1fe1ec675386a4be12471a8b785a385d326316.zip cpython-9e1fe1ec675386a4be12471a8b785a385d326316.tar.gz cpython-9e1fe1ec675386a4be12471a8b785a385d326316.tar.bz2 |
A couple of changes to make this more conformant. MvL and Uche agree.
This will make it incompatible with the version found in Python 2.0.
Does this need to be done to PyXML too?
Changes that might break existing code are marked with (!) below.
- Formatting nit: no spaces inside parentheses: foo( a ) -> foo(a).
- Break long lines.
- (!) Fix getAttribute() and getAttributeNS() to return "" instead of
raising KeyError when the attribute is not found.
- (!) Fix getAttributeNodeNS() to return None instead of raising
KeyError. (Curiously, getAttributeNode() already did this.)
- Added hasAttributes(), which returns true iff the node has any
attributes. )This is DOM level 3.)
- (!) In createDocument(), if the qualified name is not empty,
actually create and insert the first element with that name (this
will become doc.documentElement). MvL believes that it should be an
error to specify an empty qualified name; I'm not going there today,
since it would require making a matching change to pulldom. Maybe
MvL will do this.
- In Document.writexml(), insert an xml declaration at the top. (This
doesn't include the encoding since there's no way to specify the
encoding. If that's preferred, all writexml() methods should be
fixed to support an optional encoding argument that they pass to
each other -- and they should use it to encode all text they write,
too. Later.)
Diffstat (limited to 'Lib/test/tokenize_tests.py')
0 files changed, 0 insertions, 0 deletions