GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing mail.python.org — [Python-Dev] Use of %c and Py_UNICODE [Python-Dev] Use of %c and Py_UNICODEGuido van Rossum [email protected]Fri, 15 Dec 2000 12:01:33 -0500
> unicodeobject.c contains this code: > > PyErr_Format(PyExc_ValueError, > "unsupported format character '%c' (0x%x) " > "at index %i", > c, c, fmt -1 - PyUnicode_AS_UNICODE(uformat)); > > c is a Py_UNICODE; applying C's %c to it only takes the lowest 8 bits, > so '%\u3000' % 1 results in an error message containing "'\000' > (0x3000)". Is this worth fixing? I'd say no, since the hex value is > more useful for Unicode strings anyway. (I still wanted to mention > this little buglet, since I just touched this bit of code.) Sounds like the '%c' should just be deleted. --Guido van Rossum (home page: http://www.python.org/~guido/)
|
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |