cpython/Lib/xml
Eugene Triguba a95e60db74
gh-91447: Fix findtext to only give an empty string on None (GH-91486)
The API documentation for [findtext](https://docs.python.org/3/library/xml.etree.elementtree.html#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 #91447.

Automerge-Triggered-By: GH:gvanrossum
2022-08-01 09:52:39 -07:00
..
dom bpo-45132 Remove deprecated __getitem__ methods (GH-28225) 2021-09-08 13:07:40 +03:00
etree gh-91447: Fix findtext to only give an empty string on None (GH-91486) 2022-08-01 09:52:39 -07:00
parsers remove __version__s dependent on subversion keyword expansion (closes #12221) 2011-05-31 20:52:17 -05:00
sax bpo-35018: Sax parser should provide user access to lexical handlers (GH-20958) 2020-08-09 12:50:53 +02:00
__init__.py Stop trying to use _xmlplus in the xml module. Closes #11164. 2011-05-09 08:05:43 +02:00