Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Normalize string.

This method takes a string coming out of mime-fields and transforms it
into a valid Python identifier. That's done by removing invalid
non-alphanumeric characters and also numeric ones placed at the
beginning of the string.

@param name: String to be normalized.
@type name: C{str}
(more...)

            def normalize(name):
        """Normalize string.

        This method takes a string coming out of mime-fields and transforms it
        into a valid Python identifier. That's done by removing invalid
        non-alphanumeric characters and also numeric ones placed at the
        beginning of the string.

        @param name: String to be normalized.
        @type name: C{str}

        @return: Normalized string.
        @rtype: C{str}
        """
        normal = name.translate(Halberd.util.table).lower()
        while normal[0].isdigit():
            normal = normal[1:]
        return ''.join(normal)
        


src/h/a/halberd-0.2.4/Halberd/clues/analysis.py   halberd(Download)
    ignored = []
    for field in different:
        method = '_get_' + Clue.normalize(field)
        if not hasattr(Clue, method):
            logger.debug('ignoring %s', field)

src/h/a/halberd-HEAD/Halberd/clues/analysis.py   halberd(Download)
    ignored = []
    for field in different:
        method = '_get_' + Clue.normalize(field)
        if not hasattr(Clue, method):
            logger.debug('ignoring %s', field)