Name
do_tag
Synopsis
s
.do_tag
(attributes
)
X
supplies a method with such a name for
each tag
, with no corresponding end tag,
that X
wants to process.
tag
must be in lowercase in the method
name, but can be in any mix of cases in the parsed text.
SGMLParser
’s
handle_tag
method calls
do_
tag
as appropriate.
attributes
is a list of pairs
(
name
,value
)
,
where name
is each
attribute’s name, lowercased, and
value
is the value, processed to resolve
entity references and character references and to remove surrounding
quotes.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.