A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-May/024804.html below:

[Python-Dev] Removing types module from stdlib

[Python-Dev] Removing types module from stdlib [Python-Dev] Removing types module from stdlibFredrik Lundh fredrik@pythonware.com
Fri, 31 May 2002 18:01:55 +0200
raymond wrote:

> There were a couple of threads on comp.lang.py with headings like
> "isinstance considered harmful".  The conclusion was that most cases =
should
> have been coded some other way.  The legitimate uses included =
implementing
> multiple dispatch (supporting calls with type differentiated =
signatures) ,
> factory functions, decorator pattern (which needs to know if the =
object was
> previously decorated), and the composite pattern (which needs to know =
if it
> 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:
>=20
> 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?

</F>





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4