Ticket #41: avoid ord(), which is slow on CPython