This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: In DOM Node Objects, add more explanations for insertBefore
Type: Stage:
Components: Documentation Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jlgijsbers, madarche, rodsenra
Priority: low Keywords:

Created on 2004-09-14 08:53 by madarche, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg22441 - (view) Author: M.-A. DARCHE (madarche) Date: 2004-09-14 08:53
At
http://www.python.org/doc/2.3.4/lib/dom-node-objects.html#l2h-4071
current documentation is:

insertBefore(newChild, refChild)
    Insert a new child node before an existing child.
It must be the case that refChild is a child of this
node; if not, ValueError is raised. newChild is returned.

While it could be more complete:

insertBefore(newChild, refChild)
    Insert a new child node before an existing child.
It must be the case that refChild is a child of this
node; if not, ValueError is raised. newChild is
returned. If refChild is None, it inserts newChild at
the end of the list of children.

Note that node.insertAfter(newKid, refChild), if it
existed, would be precisely equivalent to
node.insertBefore(newKid,refChild.getNextSibling()).
msg22442 - (view) Author: Rodrigo Dias Arruda Senra (rodsenra) Date: 2004-11-07 19:20
Logged In: YES 
user_id=9057

The patch 1062033 adds """
If refChild is None, it inserts newChild at
the end of the list of children.
""" to the xmldom.tex.

I left the last paragraph out of the patch, because I'm not
certain
it is clear enough or adequate.
msg22443 - (view) Author: Johannes Gijsbers (jlgijsbers) * (Python triager) Date: 2004-11-07 19:56
Logged In: YES 
user_id=469548

Fixed by applying patch 1062033.
History
Date User Action Args
2022-04-11 14:56:07adminsetgithub: 40909
2004-09-14 08:53:50madarchecreate