diff Objects/typeobject.c @ 41463:5f8a87fb4df3 legacy-trunk

When __slots__ are set to a unicode string, make it work the same as setting a plain string, ie don't expand to single letter identifiers.
author Neal Norwitz <nnorwitz@gmail.com>
date Sat, 14 Apr 2007 05:25:50 +0000
parents 12c70558074e
children 5a6d903ab7b5
line wrap: on
line diff
--- a/Objects/typeobject.c	Fri Apr 13 23:22:05 2007 +0000
+++ b/Objects/typeobject.c	Sat Apr 14 05:25:50 2007 +0000
@@ -1816,7 +1816,7 @@
 		/* Have slots */
 
 		/* Make it into a tuple */
-		if (PyString_Check(slots))
+		if (PyString_Check(slots) || PyUnicode_Check(slots))
 			slots = PyTuple_Pack(1, slots);
 		else
 			slots = PySequence_Tuple(slots);