def attrib(self):
        """Return the attributes dictionary for the first element.
        If the list is empty, return an empty dict.
        """
        for x in self:
            return x.attrib
        else:
            return {}
Return the attributes dictionary for the first element.
        If the list is empty, return an empty dict.
        
stackoverflow/venv/lib/python3.6/site-packages/parsel/selector.py