mirror of https://github.com/python/cpython
d717be04dc
When testing element truth values, emit a DeprecationWarning in all implementations. This had emitted a FutureWarning in the rarely used python-only implementation since ~2.7 and has always been documented as a behavior not to rely on. Matching an element in a tree search but having it test False can be unexpected. Raising the warning enables making the choice to finally raise an exception for this ambiguous behavior in the future. |
||
---|---|---|
.. | ||
ElementInclude.py | ||
ElementPath.py | ||
ElementTree.py | ||
__init__.py | ||
cElementTree.py |