def xstr(s, encoding="utf-8"):
        if isinstance(s, str):
            return s
        else:
            return unicode(s).encode(encoding)
Return an attribute object for the given name.
dataset/ETHPy150Open nigelsmall/py2neo/py2neo/compat.py/xstr--crossover with--dataset/ETHPy150Open andrew-gardner/dependsworkflow/depends/depends_node.py/DagNode.attributeNamed