
Feb. 7, 2005
4:31 p.m.
Any objections to replacing the likes of types.IntType and types.ListType with int and list?
I presume in isinstance tests etc.? In general the procedure for modernizing source code is not to touch it unless you're reviewing or editing the whole module (or at least part of it) anyway. This would be a good occasion to see if perhaps the tests you find are formulated too narrowly -- e.g. isinstance(x, int) should almost always be isinstance(x, (int, long)), and isinstance(x, list) is also often a poorly written test for "sequence-ness". -- --Guido van Rossum (home page: http://www.python.org/~guido/)