'Compute a string key for a given field/format/conversion.
@param fieldName: A format field name.
@type fieldName: L{str}
@param formatSpec: A format spec.
@type formatSpec: L{str}
@param conversion: A format field conversion type.
@type conversion: L{str}
@return: A key specific to the given field, format and conversion, as
well as the occurrence of that combination within this
L{KeyFlattener}\'s lifetime.
@rtype: L{str}'

def flatKey(self, fieldName, formatSpec, conversion):

    result = '{fieldName}!{conversion}:{formatSpec}'.format(fieldName=fieldName, formatSpec=(formatSpec or ''), conversion=(conversion or ''))
    self.keys[result] += 1
    n = self.keys[result]
    if (n != 1):
        result += ('/' + str(self.keys[result]))
    return result
