Newbie, list has no attribute iteritems

Justin Ezequiel justin.mailinglists at gmail.com
Fri Jul 4 11:59:31 CEST 2008


    def handle_starttag(self, tag, attrs):   # <-- attrs here is a
list
        if 'a' != tag:
            self.stack.append(self.__html_start_tag(tag, attrs))    #
<-- attrs here is still a list
            return
        attrs = dict(attrs)    # <-- now attrs is a dictionary



More information about the Python-list mailing list