From: Jeff A. <ja...@fa...> - 2012-12-21 09:59:51
|
Would it be fair to say that the character codes in a Jython PyString.string member should always be in the range 0..255 inclusive? I'm working on failures and skips in the test_io, and the failure in CTextIOWrapperTest.test_initialization() looks like it is to do with codecs, both the choice of a default one on my machine and the behaviour of the "ascii" codec once I force it in. Codecs confuse me, and more in Jython's innards than in Python code (Python 3 anyway), because it is less clear when some String/str is supposed to hold bytes and when real characters. I came across this in PyByteArray and breathed a huge sigh of relief once the tests passed, without ever being really sure I'd done it right. Apart from having to forego Java's lovely String methods, we wish we'd used an array of bytes implementation for PyString: right? Jeff |