[Python-Dev] basenumber redux

Guido van Rossum guido at python.org
Tue Jan 17 04:00:23 CET 2006


On 1/16/06, Alex Martelli <aleaxit at gmail.com> wrote:
> Nothing was said about "different design intent for basestring", as I
> recall (that discussion comes up among the few hits for [basestring
> site:python.org] if you want to check the details).

Please. How many times do I have to say this. *I added this with the
stated intent.* Maybe I didn't communicate that intent clearly. But my
intent was exactly as it is documented -- basestring == (str, unicode)
and nothing else.

Why this intent? Because I felt the need to be able to distinguish the
*built-in* string types from *anything* else; they have many special
properties and purposes.

Also note that basestring was introduced in 2.3, a whole release
*after* inheritance from str was made possible.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list