[Python-checkins] python/dist/src/Python bltinmodule.c,2.255,2.256

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Fri, 24 May 2002 12:02:02 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv24325/Python

Modified Files:
	bltinmodule.c 
Log Message:
- 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.


Index: bltinmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v
retrieving revision 2.255
retrieving revision 2.256
diff -C2 -d -r2.255 -r2.256
*** bltinmodule.c	12 May 2002 07:19:38 -0000	2.255
--- bltinmodule.c	24 May 2002 19:01:59 -0000	2.256
***************
*** 1906,1909 ****
--- 1906,1910 ----
  	SETBUILTIN("staticmethod",	&PyStaticMethod_Type);
  	SETBUILTIN("str",		&PyString_Type);
+ 	SETBUILTIN("string",		&PyBaseString_Type);
  	SETBUILTIN("super",		&PySuper_Type);
  	SETBUILTIN("tuple",		&PyTuple_Type);