
Dec. 4, 2003
11:36 p.m.
On Thu, 4 Dec 2003, Andrew Koenig wrote:
(It has been pointed out that subclassing int isn't very useful, so maybe this is a moot point. Does anybody have a real use case?)
isinstance(x, int)
If that's really the only use case, is the following not sufficient? isinstance(x, types.IntegralTypes) (where IntegralTypes == (int, long), analogously to types.StringTypes) John