GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-128508: Add some docstrings to xml.dom.minidom by srinivasreddy · Pull Request #128477 · python/cpython Conversation
|
| """ | ||
| Clone a node and give it the new owner document. | ||
| Returns a copy of node. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Remove \n after """. Add after this line. But this revision seems wrong as it omits mention of newOwnerDocument. I would have to read code to suggest improvement.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.childNodes[:] = L | ||
|
|
||
| def cloneNode(self, deep): | ||
| """The Node.cloneNode() method returns a duplicate of the node.""" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Should be "Return a duplicate ...", but needs to explain 'deep' (I suspect it is a boolean.) Docstrings are for quick reminders when coding, and 'deep' is not obvious.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| return self.internalSubset | ||
|
|
||
| def cloneNode(self, deep): | ||
| """The Node.cloneNode() method returns a duplicate of the node.""" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
See other cloneNode comment.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| return node | ||
|
|
||
| def replaceChild(self, newChild, oldChild): | ||
| """Replace an existing node with a new node.""" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| """Replace an existing node with a new node.""" | |
| """Replace child node *oldChild* with *newChild*.""" |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Terry Jan Reedy <[email protected]>
Co-authored-by: Terry Jan Reedy <[email protected]>
Co-authored-by: Terry Jan Reedy <[email protected]>
…o()` (python#128337) These methods combine `_delete()` and `copy()`, but `_delete()` isn't part of the public interface, and it's unlikely to be added until the pathlib ABCs are made official, or perhaps even later.
Co-authored-by: Hugo van Kemenade <[email protected]>
…er test (python#128338) In the tests for `pathlib.Path.walk()`, avoid using the path class under test (`self.cls`) in test setup. Instead we use `os` functions in `test_pathlib`, and direct manipulation of `DummyPath` internal data in `test_pathlib_abc`.
Co-authored-by: Bénédikt Tran <[email protected]>
pythongh-128455) Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` Co-authored-by: Gregory Szorc <[email protected]>
…he atomic operation (pythongh-128196)
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Erlend E. Aasland <[email protected]>
Co-authored-by: Erlend E. Aasland <[email protected]>
|
|
||
|
|
||
| class Node(xml.dom.Node): | ||
| """Define properties accessible on a DOM node.""" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think it’s strange to have a class docstring start with a verb; it makes sense for a method (that does something), but a class usually represents a thing (noun), it does not do something.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Addressed in b97d812
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| https://dom.spec.whatwg.org/#dom-node-insertbefore | ||
| The insertBefore(node, child) method, when invoked, | ||
| must return the result of pre-inserting node into | ||
| this before child. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think the docstring should document what the method does, not quote parts of a spec.
I would suggest simpler wording, but I don’t understand the existing one («the result of pre-inserting node into this before child» ?!)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Addressed in b97d812
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| The insertBefore(node, child) method, when invoked, | ||
| must return the result of pre-inserting node into | ||
| this before child. | ||
| See also https://dom.spec.whatwg.org/#concept-node-pre-insert |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I would have links like this in the reST docs, not docstrings.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Addressed in b97d812
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Erlend E. Aasland <[email protected]>
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The formatting concerns from the earlier reviews look addressed. Some remarks on the content:
Also, this only adds a docstring for the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.