def METHOD_NAME(self):
    """Gets the actual value corresponding to what the user typed."""
    try:
        value = self.control.text()
    except AttributeError:
        value = self.control.toPlainText()
    value = str(value)
    try:
        value = self.evaluate(value)
    except:
        pass
    try:
        ret = self.factory.mapping.get(value, value)
    except TypeError:
        # The value is probably not hashable.
        ret = value
    return ret