import re


def get_property_type(prop):
    """Convert property classname into pretty string name of property.

    """
    try:
        prop_class = prop.__name__
    except AttributeError:
        prop_class = prop.__class__.__name__
    # Remove 'Property' from the string
    prop_class = prop_class.split('Property')[0]
    # Split camelcase with spaces
    split_camelcase = re.sub('(?!^)([A-Z][a-z]+)', r' \1', prop_class).split()
    prop_class = ' '.join(split_camelcase)
    return prop_class