diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-04-14 05:25:50 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-04-14 05:25:50 (GMT) |
commit | cbd9ee69eeaadf7a50007532071890b4eaeae664 (patch) | |
tree | 0e1bcd75cf21a754e466a04db0c97f87cb2086dd /Objects | |
parent | e6bdb9be0e7db045a71d6df3c6dd8eb2994c4ab9 (diff) | |
download | cpython-cbd9ee69eeaadf7a50007532071890b4eaeae664.zip cpython-cbd9ee69eeaadf7a50007532071890b4eaeae664.tar.gz cpython-cbd9ee69eeaadf7a50007532071890b4eaeae664.tar.bz2 |
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.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds) /* 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); |