'Return field position by filed name.
Parameters
name: :py:class:`str`
Field name
Returns
: :py:class:`int`
Field position in fields set
Raises
: :class:`~pyasn1.error.PyAsn1Error`
If *name* is not present or not unique within callee *NamedTypes*'

def getPositionByName(self, name):

    try:
        return self.__nameToPosMap[name]
    except KeyError:
        raise error.PyAsn1Error(('Name    %s    not    found' % (name,)))
