For my r&l series of Python scripts for rendering and lighting, I often wanted to pass extra arguments to functions when clicking a button or changing the value of a field. By importing the partial module from functools you can choose a function and pass extra arguments into it.

You'll need to import the partial module as follows:

from functools import partial

Then to define a floatfield that calls a function with arguments, you can use this syntax:

cmds.floatField(light + 'intensity', v=cmds.getAttr(light + '.intensity'), cc=partial(updateFloat, light, 'intensity'), ec=partial(updateFloat, light, 'intensity'), w=60)

Where the first argument to the partial function is the name of the function you want to call, and the following arguments are the values you want to pass to the function.

The function updateFloat is defined as follows:

def updateFloat(light, kind, *args):
	sel_light = cmds.listRelatives(cmds.textField(light + 'name', q=True, tx=True), s=True)[0]
	cmds.setAttr(sel_light + '.' + kind, args[0])

Where the listRelatives function returns the transform node of the light defined by the value returned from the contents of the textField. And then you set the attribute of the selected light based on the 'kind' argument passed in, and update it to the value defined in the list of args that was passed by the UI element.