def check_attribute(targattr):
    # This is used if the attribute is optional (or if error checking is handled by the calling
    # routine); if an error needs to be raised, use get_attribute()
    if (targattr in PETRglobals.AttributeList):
        return (
            PETRglobals.AttributeList[
                PETRglobals.AttributeList.index(targattr) + 1]
        )
    else:
        return ""
Returns the named parse results as dictionary.
dataset/ETHPy150Open openeventdata/petrarch/petrarch/PETRreader.py/check_attribute--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/IPython/external/pyparsing/_pyparsing.py/ParseResults.asDict