[Python-Dev] Removing types module from stdlib

Neal Norwitz neal@metaslash.com
Fri, 31 May 2002 10:08:29 -0400


Should I start converting/removing uses of the types module where possible?

So where we have:
	assert type(lineno) is types.IntType
	assert type(lineno) in (types.IntType, types.LongType)

would become:
	assert type(lineno) is int
	assert type(lineno) in (int, long)

or
	assert isinstance(lineno, int)
	assert isinstance(lineno, (int, long))

Preferences?

Neal