Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 75d3c9b

Browse files
authored
Merge pull request #16282 from anntzer/unun
Replace "unicode" by "str" in docs, messages when referring to the type.
2 parents 7879cb0 + 093a592 commit 75d3c9b

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

lib/matplotlib/category.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,14 @@ def update(self, data):
196196
197197
Parameters
198198
----------
199-
data : iterable
200-
sequence of string values
199+
data : iterable of str or bytes
201200
202201
Raises
203202
------
204203
TypeError
205-
If the value in data is not a string, unicode, bytes type
204+
If elements in *data* are neither str nor bytes.
206205
"""
207206
data = np.atleast_1d(np.array(data, dtype=object))
208-
209207
# check if convertible to number:
210208
convertible = True
211209
for val in OrderedDict.fromkeys(data):

src/ft2font_wrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ static PyObject *PyFT2Font_set_text(PyFT2Font *self, PyObject *args, PyObject *k
717717
codepoints[i] = bytestr[i];
718718
}
719719
} else {
720-
PyErr_SetString(PyExc_TypeError, "String must be unicode or bytes");
720+
PyErr_SetString(PyExc_TypeError, "String must be str or bytes");
721721
return NULL;
722722
}
723723

src/py_converters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static int convert_string_enum(PyObject *obj, const char *name, const char **nam
2727
Py_INCREF(obj);
2828
bytesobj = obj;
2929
} else {
30-
PyErr_Format(PyExc_TypeError, "%s must be bytes or unicode", name);
30+
PyErr_Format(PyExc_TypeError, "%s must be str or bytes", name);
3131
return 0;
3232
}
3333

0 commit comments

Comments
 (0)