Hi, In Python 3, reading from a file gives bytes rather than characters. Some operations currently performed on strings also make sense when performed on bytes, either if it's binary data or if it's text of unknown or mixed encoding. Those include of course slicing and other operators that exist in lists, but also other operations that aren't currently defined in PEP 358, like:
- str methods endswith, find, partition, replace, split(lines), startswith, - Regular expressions I think those can be useful on a bytes type. Perhaps bytes and str could share a common parent class? They certainly share a lot of properties and possible operations one might want to perform. kind regards, Gerrit Holl. -- My first English-language post ever was made to this newsgroup: http://groups.google.com/group/comp.lang.python/msg/f957acf785ddfb71 :) -- http://mail.python.org/mailman/listinfo/python-list