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/2001-May/014824.html below:

[Python-Dev] Comparison speed

[Python-Dev] Comparison speed [Python-Dev] Comparison speedMartin v. Loewis martin@loewis.home.cs.tu-berlin.de
Wed, 16 May 2001 09:28:45 +0200
> Sounds like we ought to do a search-and-destroy on type comparisons,
> replacing with isinstance() where possible.

At least in my applications, this is unfortunately not possible: I
want a test for byte-string-or-unicode-string. This could be done with
two isinstance calls, but that is certainly less efficient.

Marc-Andre once proposed a type representing the immediate supertype
of both byte strings and unicode strings; let's call it abstract string.
Then I could write isinstance(e, types.AbstractString).

Regards,
Martin




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