flam...@gmail.com wrote:
... Using this code, I can get information like the name of the symbol
(x), but I can't figure out how to get the type. If I knew how to get
this it would solve 99% of my problems :)

If Python were statically typed, you might be correct.
A _value_ in python has a type, not a variable.  so, you can do:
   some_list = []
   for a in None, True, 1, 1.0, 3.1j, 'text', u'text':
       some_list.append(a)
   print some_list
and you will see something like:
[None, True, 1, 1.0, 3.1000000000000001j, 'text', u'text']
That is, a has the type of its current value.
any kind of object can be stored in any variable.

--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to