type-checking / type() function

Ben S newsgroups2002 at thedarkness.fsnet.co.uk
Tue Aug 20 12:59:40 EDT 2002


How can I implement rudimentary type-checking in the functions where I
need it? (Where user Python code passes parameters to my Python code,
for example.) I figure the type() function is what I need, but I can't
find much information on what exactly it returns, and 'InstanceType'
isn't specific enough. Is there a way of getting the class name from an
instance?

--
Kylotan
http://pages.eidosnet.co.uk/kylotan





More information about the Python-list mailing list