def normalize(val):
    """ Normalize a string so that it can be used as an attribute
    to a Python object """
    
    if val.find('-') != -1:
        val = val.replace('-','_')

    return val
 Normalize a string so that it can be used as an attribute
    to a Python object 
recipes/Python/498249_Composite_designpattern_using/recipe-498249.py