File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1522,7 +1522,7 @@ array_fromunicode(arrayobject *self, PyObject *args)
15221522 if (!PyArg_ParseTuple (args , "u#:fromunicode" , & ustr , & n ))
15231523 return NULL ;
15241524 typecode = self -> ob_descr -> typecode ;
1525- if (( typecode != 'u' ) ) {
1525+ if (typecode != 'u' ) {
15261526 PyErr_SetString (PyExc_ValueError ,
15271527 "fromunicode() may only be called on "
15281528 "unicode type arrays" );
@@ -1554,7 +1554,7 @@ array_tounicode(arrayobject *self, PyObject *unused)
15541554{
15551555 char typecode ;
15561556 typecode = self -> ob_descr -> typecode ;
1557- if (( typecode != 'u' ) ) {
1557+ if (typecode != 'u' ) {
15581558 PyErr_SetString (PyExc_ValueError ,
15591559 "tounicode() may only be called on unicode type arrays" );
15601560 return NULL ;
@@ -2177,10 +2177,11 @@ array_repr(arrayobject *a)
21772177 if (len == 0 ) {
21782178 return PyUnicode_FromFormat ("array('%c')" , (int )typecode );
21792179 }
2180- if (typecode == 'u' )
2180+ if (typecode == 'u' ) {
21812181 v = array_tounicode (a , NULL );
2182- else
2182+ } else {
21832183 v = array_tolist (a , NULL );
2184+ }
21842185
21852186 s = PyUnicode_FromFormat ("array('%c', %R)" , (int )typecode , v );
21862187 Py_DECREF (v );
You can’t perform that action at this time.
0 commit comments