New submission from Charalampos Stratakis <cstra...@redhat.com>:

Analyzing some coverity scan results I stumbled upon this issue:

Python-3.6.5/Lib/xml/dom/minidom.py:1914: original: 
"n._call_user_data_handler(operation, n, notation)" looks like the original 
copy.
Python-3.6.5/Lib/xml/dom/minidom.py:1924: copy_paste_error: "n" in 
"e._call_user_data_handler(operation, n, entity)" looks like a copy-paste error.
Python-3.6.5/Lib/xml/dom/minidom.py:1924: remediation: Should it say "e" 
instead?
# 1922|                   clone.entities._seq.append(entity)
# 1923|                   if hasattr(e, '_call_user_data_handler'):
# 1924|->                     e._call_user_data_handler(operation, n, entity)
# 1925|       else:
# 1926|           # Note the cloning of Document and DocumentType nodes is

It seems that the warning is indeed a bug, and the code in question was 
basically merged into python from pyxml 16 years ago.

----------
components: Library (Lib)
messages: 328321
nosy: cstratak
priority: normal
severity: normal
status: open
title: Coverity scan: copy/paste error in Lib/xml/dom/minidom.py
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35052>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to