Antoine Pitrou <pit...@free.fr> added the comment:

I would rather document it in TextIOBase:
http://docs.python.org/dev/library/io.html#io.TextIOBase

With text I/O streams, tell() returns an arbitrary "position cookie", meaning 
you can't meaningfully do arithmetic on it: this is why cur-relative seeking 
and end-relative seeking isn't supported.

Of course, on StringIO the "arbitrary position cookie" is a perfectly 
well-defined character offset, so we *could* specifically enhance 
StringIO.tell. Whether it's a good idea to do it (while arbitrary text files 
would still have the limitation) is left to debate.

----------
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, pitrou
type: enhancement -> behavior
versions: +Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12922>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to