(string)
return string
Hacky singularization function.
Hacky singularization function.
Hacky singularization function .
def _singularize(string):
    """Hacky singularization function."""

    if string.endswith("ies"):
        return string[:-3] + "y"
    if string.endswith("s"):
        return string[:-1]
    return string
def _singularize ( string ) : if string . endswith ( "ies" ) : return string [ : - 3 ] + "y" if string . endswith ( "s" ) : return string [ : - 1 ] return string