Fredrik Lundh schrieb: >> The best you could do would be to return some kind >> of opaque object from tell() that could be passed >> back to seek(). > > that's how seek/tell works on text files in today's Python, of course. > if you're writing portable code, you can only seek to the beginning or > end of the file, or to a position returned to you by tell.
The problem is that for character-oriented streams, that position should also incorporate the "shift state" of the codec. To support that, the codec API would need to grow a way to export and import its state into such "tell objects". Regards, Martin _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com