Skip to content

Conversation

@miss-islington
Copy link
Contributor

The API documentation for findtext states that this function gives back an empty string on "no text content." With the previous implementation, this would give back a empty string even on text content values such as 0 or False. This patch attempts to resolve that by only giving back an empty string if the text attribute is set to None. Resolves GH-91447.

Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit a95e60d)

Co-authored-by: Eugene Triguba eugenetriguba@gmail.com

…thonGH-91486)

The API documentation for [findtext](https://docs.python.org/3/library/xml.etree.elementtree.htmlGH-xml.etree.ElementTree.Element.findtext) states that this function gives back an empty string on "no text content." With the previous implementation, this would give back a empty string even on text content values such as 0 or False. This patch attempts to resolve that by only giving back an empty string if the text attribute is set to `None`. Resolves pythonGH-91447.

Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit a95e60d)

Co-authored-by: Eugene Triguba <eugenetriguba@gmail.com>
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit b12dba4 into python:3.11 Aug 1, 2022
@miss-islington miss-islington deleted the backport-a95e60d-3.11 branch August 1, 2022 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants