import string


def _get_placeholders(template):
    """Get all placeholders from a template string.
    Parameters
    ----------
    template : str
        The template string to get the placeholders for.
    Returns
    -------
    placeholders : list of str
        The list of placeholder names that were found in the template string.

    Author: Marijn van Vliet <w.m.vanvliet@gmail.com>
    """
    return [p[1] for p in string.Formatter().parse(template)
            if p[1] is not None and len(p[1]) > 0]