Equivalent to c++ typeof(x)

Jason Orendorff jason at jorendorff.com
Wed Jan 9 11:37:59 EST 2002


> type(x) == type(y)  # I'd like this line to return false but it returns 
> true!
> 
> Any suggestions?

x.__class__ == y.__class__

## Jason Orendorff    http://www.jorendorff.com/




More information about the Python-list mailing list