(self)
Return an xml variable name to represent this key.

        If the key contains spaces or a condition-predicate of an if-clause,
        return a hash of the key with "h" prepended.
        If not, return the key with "k" prepended.

        The prepended characters prevent the variable name from starting with a
        numeral, which is illegal.
Return an xml variable name to represent this key.
Return an xml variable name to represent this key .
def key_as_variable(self):
        """
        Return an xml variable name to represent this key.

        If the key contains spaces or a condition-predicate of an if-clause,
        return a hash of the key with "h" prepended.
        If not, return the key with "k" prepended.

        The prepended characters prevent the variable name from starting with a
        numeral, which is illegal.
        """
        if re.search(r'\W', self.key) or self.treat_as_expression:
            return 'h{hash}'.format(hash=hashlib.md5(self.key.encode('UTF-8')).hexdigest()[:8])
        else:
            return 'k{key}'.format(key=self.key)
def key_as_variable ( self ) : if re . search ( r'\W' , self . key ) or self . treat_as_expression : return 'h{hash}' . format ( hash = hashlib . md5 ( self . key . encode ( 'UTF-8' ) ) . hexdigest ( ) [ : 8 ] ) else : return 'k{key}' . format ( key = self . key )