-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
DOC: Add some documentation strings to xml.dom.minidom. #7908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Write documentation string for xml.dom.minidom.Element.getAttribute method. I think it would be better to know what exactly it returns from pydoc.
Also write a documentation string for getElementsByTagName method to note that it returns not only direct children.
Write more docstrings to xml.dom.minidom
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. When your account is ready, please add a comment in this pull request Thanks again for your contribution, we look forward to reviewing it! |
Hello. After using xml.dom.minidom for a while, I think it really lacks documentation strings. For example, I have just been surprised the Element.getAttribute should returns an empty string if the element does not contain such an attribute. I expected it to return None it that case because an empty string may also be an explicitly given attribute value. So, I think it would be better to be able to know such aspects of xml.dom.minidom behavior from pydoc command. Even though there is a plenty of other sources of this information, pydoc is perhaps easiest to use. So, first I added documentation strings to a few methods of xml.dom.minidom.Element class. What do you think? Thank you. Alex. |
Thanks for the PR, but closing as the CLA has not been signed within the last month. If you do decide to sign the CLA we can re-open this PR. |
@brettcannon Ok, I have signed the CLA. Sorry for delay. |
@alexitkes unfortunately because you either force-pushed or recreated your |
Add documentation strings to some methods of the xml.dom.minidom.Element class. It would be possibly better to be able to know some small but important features of these methods directly from pydoc.
The Element.getAttribute method returns an empty string both if there is no such attribute and if an empty string is an explicitly given attribute value. It never returns None.
The Element.getElementsByTagName methods returns all descendants, not direct children only.