2006-09-05 15:49 +0200, Gardner Pomper <[EMAIL PROTECTED]>: > Hi, > > I am writing a specialized xml serialization function, and I would like to > be able to serialize the value of a simple object with the object name as > the tag. For example: > > first_name = 'Fred' > > sXML = my_xml_serializer(first_name) > > should result in sXML = '<first_name>Fred</first_name>' > > I can get class and field names, but how do I find the name of a simple > variable?
A recent thread[1] might be a useful starting point. [1] "how do you get the name of a dictionary?" URL: <http://mail.python.org/pipermail/python-list/2006-August/357006.html> -- Gonzalo HIGUERA DÍAZ <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list