== versus is operators and type()

Alvaro Figueiredo alvarof at freeshell.org
Wed Feb 26 12:31:59 EST 2003


Hi, All.

When dealing with type() function is the same to use == operator and 
'is' operator?

As an example, are the two expressions bellow totally equivalent?

type(arg) is type(0) or type(arg) is type(0.0)

type(arg) in (type(0), type(0.0))

Thanks in advance.

-- 
Alvaro Figueiredo
alvarof at freeshell.org





More information about the Python-list mailing list