def make_python_name(self, name):
        """Transforms an USR into a valid python name."""
        # FIXME see cindex.SpellingCache
        for k, v in [('<', '_'), ('>', '_'), ('::', '__'), (',', ''), (' ', ''),
                     ("$", "DOLLAR"), (".", "DOT"), ("@", "_"), (":", "_"),
                     ('-', '_')]:
            if k in name:  # template
                name = name.replace(k, v)
            # FIXME: test case ? I want this func to be neutral on C valid
            # names.
            if name.startswith("__"):
                return "_X" + name
        if len(name) == 0:
            pass
        elif name[0] in "01234567879":
            return "_" + name
        return name
def make_python_name ( self , name ) : for k , v in [ ( '<' , '_' ) , ( '>' , '_' ) , ( '::' , '__' ) , ( ',' , '' ) , ( ' ' , '' ) , ( "$" , "DOLLAR" ) , ( "." , "DOT" ) , ( "@" , "_" ) , ( ":" , "_" ) , ( '-' , '_' ) ] : if k in name : name = name . replace ( k , v ) if name . startswith ( "__" ) : return "_X" + name if len ( name ) == 0 : pass elif name [ 0 ] in "01234567879" : return "_" + name return name
Transforms an USR into a valid python name.