How to display name of elements in list?
Stefan Behnel
stefan.behnel-n05pAM at web.de
Wed Jul 12 10:04:50 EDT 2006
cz schrieb:
>> The list above is not a valid Python list. What is it that you store in that list?
>>
>> Or is it maybe a dictionary?
>>
>> Stefan
>
> Thanks for your help. How can I find out about what this is? As I said
> it's generated by a insufficiently documented module. So if this is a
> user defined datatype, is there still a possibility to find the name of
> the data fields storing the xx, xy, ... ?
Maybe you should read a bit about Python classes and built-in functions like
"dir()", "type()", "vars()", ...
http://docs.python.org/tut/node8.html#SECTION008300000000000000000
http://docs.python.org/tut/node11.html
http://docs.python.org/lib/built-in-funcs.html
Just start an interactive Python session and play with the object you are
trying to explore. That should get you going.
Stefan
More information about the Python-list
mailing list