biopython/biopython — pull request #340 by peterjc (2014-06-16 06:56:58+00:00)
Title: Bio.Cluster not checking arguments under Python 3

I found this while investigating what is probably a big-endian issue in the C code which checks the single-letter arguments (not fixed, see mailing list discussion):

```
if (PyUnicode_Check(object))
data = PyUnicode_AS_DATA(object);
# ...
if (strlen(data)!=1)
{ PyErr_Format(PyExc_ValueError, "method should be a single character (not '%s')", data);
return 0;
}
```
Jakob worte: But PyUnicode_AS_DATA() returns a pointer to UTF-32 data. On big-endian architectures (such as powerpc or s390x), the first byte is always 0, so strlen() returns 0.