Mega Code Archive

 
Categories / Python / Development
 

Reflection

from types import *   def what (x):      if type(x) == IntType:              print "This is an int."      else:              print "This is something else."   what(4) what("4")