found a method that seems to work for me here using the id as a string and ctypes
class Foo:
pass
f = Foo()
f.thing = 'Jeff'
import ctypes
long_f = id(f)
y = ctypes.cast(long_f,ctypes.py_object).value
name = y.thing
and here, an example usage in Maya;
command = ("python(\"ctypes.cast(%s,ctypes.py_object).value.thing=False\")")%(id(self))
nameCommand = cmds.nameCommand( 'setThingOnPress', annotation='', command=command )
cmds.hotkey( keyShortcut='b', name=nameCommand)