commit | cbd9ee69eeaadf7a50007532071890b4eaeae664 | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Sat Apr 14 05:25:50 2007 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Sat Apr 14 05:25:50 2007 +0000 |
tree | 0e1bcd75cf21a754e466a04db0c97f87cb2086dd | |
parent | e6bdb9be0e7db045a71d6df3c6dd8eb2994c4ab9 [diff] [blame] |
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.
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 0ce7f82..285bd67 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c
@@ -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);