[Python-Dev] Removing types module from stdlib
Fri, 31 May 2002 18:01:55 +0200
> There were a couple of threads on comp.lang.py with headings like
> "isinstance considered harmful". The conclusion was that most cases =
> have been coded some other way. The legitimate uses included =
> multiple dispatch (supporting calls with type differentiated =
> factory functions, decorator pattern (which needs to know if the =
> previously decorated), and the composite pattern (which needs to know =
> is dealing with an atom or a composite).
since when is comp.lang.py is an authority on anything?
> Here are some of the ideas for conversion:
> if type(x) is int --> if x=3D=3Dint(x) # 3L would be passable
are these supposed to be equivalent, for any kind of x? what
Python version are you using?