Author mehendran
Date 2008-01-31.15:06:35
SpamBayes Score
Marked as misclassified
For the point no 3:

In jython, the function requires both the pattern and the object to be searched to be a string instance.In python, the object to be searched can be either a string or a buffer object. 
Python provides support for "buffer interface"(please see which jython does not.Thus in python, array & mmap objects(which implement the buffer interface) along with strings can be used as arguments to functions like file.write(), etc. which accept buffer objects/strings as arguments.In jython, due to lack of buffer support, functions like file.write() and accept only a string instance as argument.As per Python's implementation of mmap, mmap is required to expose the buffer interface so that it can be used as argument to this is precisely what is tested in the test-file.
Instead of deriving mmap from PyString, the code for can be modified to deal with mmap object as a special case(for the sole purpose of making the tests pass!).Another way to do it would be to subclass PyString,but instead of maintaining a string that is a duplicate of the mmap contents,the string would be simply maintaind as an empty string.However,I guess it will be a better idea to skip the test where a mmap instance is checked to see whether it has buffer-like behaviour.Even Jython's array implementation has no buffer support.   
Is there any specific reason why jython does not have buffer support?

Please clarify...
Date User Action Args
2008-02-20 17:18:54adminlinkissue1854873 messages
2008-02-20 17:18:54admincreate