Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 75d3c9b

Browse filesBrowse 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
Copy full SHA for 75d3c9b

File tree

Expand file treeCollapse file tree

3 files changed

+4
-6
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-6
lines changed

‎lib/matplotlib/category.py

Copy file name to clipboardExpand all lines: lib/matplotlib/category.py
+2-4Lines 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

Copy file name to clipboardExpand all lines: src/ft2font_wrapper.cpp
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/py_converters.cpp
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.