Ezio Melotti <ezio.melo...@gmail.com> added the comment:

If we follow the behavior of the browser, we will have to pick one of the two 
values and discard the other, making this value unaccessible.  If we provide 
both, scripts and libraries that use HTMLParser will have access to both and 
can decide what to do.

For example BeautifulSoup already does the right thing:
>>> bs4.BeautifulSoup('<!doctype html><div class="bar" class="foo">text</div>')
<!DOCTYPE html>
<html><body><div class="bar">text</div></body></html>

Changing this might also break code that rely on this behavior.  I'm therefore 
going to close this as "not a bug".

----------
assignee:  -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

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

Reply via email to