[Zope] Checking variable types in Python Script

Dieter Maurer dieter@handshake.de
Thu, 12 Sep 2002 20:18:37 +0200


Johan Carlsson[ Torped] writes:
 > At 20:41 2002-09-09 +0200, Dieter Maurer said:
 > >There is "same_type(object,sample)". It tests whether "object"
 > >and "sample" are of the same type.
 > 
 > That would do the trick.
 > 
 > But I would like to have special type checking API in Python scripts.
 > E.g. isString, isTuple, isList, etc. That's my 5 cents anyway.
"same_type(x,'')", "same_type(x,())", "same_type(x,[])" ...

   Why do you want a whole set of new names?


Dieter