[issue7022] Doc update for io module
Pascal Chambon chambon.pas...@gmail.com added the comment: Thanks a lot B-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7022 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7022] Doc update for io module
Changes by Georg Brandl ge...@python.org: -- assignee: georg.brandl - pitrou nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7022 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7022] Doc update for io module
Antoine Pitrou pit...@free.fr added the comment: If you are requesting new `start` and `end` arguments to readinto(), the way to do that today is to use a memoryview: # b is your bytearray, f your IO object m = memoryview(b)[start:end] f.readinto(m) If you still want that feature, please open a separate bug (doc updates and feature requests should be open separately) :-) As for the first part of the report (RawIOBase.read), I'll look into it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7022 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7022] Doc update for io module
Antoine Pitrou pit...@free.fr added the comment: Actually, I'm not sure what is wrong with the current doc: read(n=-1)ΒΆ Read and return up to n bytes from the stream. As a convenience, if n is unspecified or -1, readall() is called. Otherwise, only one system call is ever made. An empty bytes object is returned on EOF; None is returned if the object is set not to block and has no data to read. (http://docs.python.org/dev/py3k/library/io.html) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7022 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7022] Doc update for io module
Changes by Antoine Pitrou pit...@free.fr: -- priority: - normal type: feature request - behavior versions: +Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7022 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7022] Doc update for io module
Pascal Chambon chambon.pas...@gmail.com added the comment: Thanks for the memoryview tip - I though I was up-to-date with python's features but obviously I wans't ^^ (I searched through dict views but that wasn't it...) It should be exactly what's needed to replace these unnecessary additional arguments. As for the simple doc update, I was just pointing out the fact that EOF is reached if read methods returns an empty bytes AND we didn't ask for 0 bytes. Just to avoid confusing people : file.read(0) will always return an empty bytes, but it doesnt mean that we're at eof, contarrily to what the doc currently says B-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7022 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7022] Doc update for io module
Antoine Pitrou pit...@free.fr added the comment: Ok, I've improved the docs a bit in r75168. Thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7022 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com