From cacfc07d083286e80b6f86939d466e186f7ea3c0 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 24 May 2002 19:01:59 +0000 Subject: - A new type object, 'string', is added. This is a common base type for 'str' and 'unicode', and can be used instead of types.StringTypes, e.g. to test whether something is "a string": isinstance(x, string) is True for Unicode and 8-bit strings. This is an abstract base class and cannot be instantiated directly. --- Python/bltinmodule.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Python/bltinmodule.c') diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index d0411e23ae..311176eb0d 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1905,6 +1905,7 @@ _PyBuiltin_Init(void) SETBUILTIN("object", &PyBaseObject_Type); SETBUILTIN("staticmethod", &PyStaticMethod_Type); SETBUILTIN("str", &PyString_Type); + SETBUILTIN("string", &PyBaseString_Type); SETBUILTIN("super", &PySuper_Type); SETBUILTIN("tuple", &PyTuple_Type); SETBUILTIN("type", &PyType_Type); -- cgit v1.2.1