def canonical(self):
        """Return a CSS representation for this selector (a string)
        """
        if isinstance(self.pseudo_element, FunctionalPseudoElement):
            pseudo_element = '::%s' % self.pseudo_element.canonical()
        elif self.pseudo_element:
            pseudo_element = '::%s' % self.pseudo_element
        else:
            pseudo_element = ''
        res = '%s%s' % (self.parsed_tree.canonical(), pseudo_element)
        if len(res) > 1:
            res = res.lstrip('*')
        return res
Return a CSS representation for this selector (a string)
        
stackoverflow/venv/lib/python3.6/site-packages/cssselect/parser.py