You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.7.3 (default, Mar 27 2019, 09:23:15)
[Clang 10.0.1 (clang-1001.0.46.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Python shell history and tab completion are enabled.
>>> from html.parser import HTMLParser
>>> class MyParser(HTMLParser):
... def handle_starttag(self, tag, attrs):
... print('%r' % attrs)
...
>>> parser = MyParser()
>>> parser.feed('<input type="number" required>')
[('type', 'number'), ('required', None)]
The text was updated successfully, but these errors were encountered:
Attributes without a value will return
None
so the correct type should be:typeshed/stdlib/3/html/parser.pyi
Line 17 in de1755b
Example:
The text was updated successfully, but these errors were encountered: