what is the the best way to express following:

AndyL ask at me
Mon Mar 27 20:40:50 EST 2006


if type(key).__name__ == "int" or type(key).__name__ == "long":
     abc()
elif type(key).__name__ == "str":
     efg()
elif type(key).__name__ == "tuple" or type(key).__name__ == "list":
     ijk()


In other words I need to determinie intiger type or string or []/() in 
elegant way, possibly without or ...

Thx, A.



More information about the Python-list mailing list