This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients alexandre.vassalotti, gregory.p.smith, loewis, pitrou
Date 2008-07-21.22:59:11
SpamBayes Score 0.06867457
Marked as misclassified No
Message-id <1216681149.6227.9.camel@fsol>
In-reply-to <4884FD38.4020206@v.loewis.de>
Content
Le lundi 21 juillet 2008 à 21:18 +0000, Martin v. Löwis a écrit :
> IIUC, a read of the full requested size would achieve exactly that: on a
> non-blocking stream (IIUC), a read will always return
> min(bytes_available, bytes_requested).

Hmm, it seems logical indeed... Alexandre, do you have other information
on the subject?

> IIUC, io.open will always return a BufferedReader, potentially with
> buffer_size=0 for unbuffered IO. This case must be supported.

No, io.open returns the raw object without wrapping it:

    if buffering == 0:
        if binary:
            raw._name = file
            raw._mode = mode
            return raw
        raise ValueError("can't have unbuffered text I/O")

We could even decide to raise a ValueError when trying to construct a
BufferedReader with a buffer_size < 1.
History
Date User Action Args
2008-07-21 22:59:13pitrousetspambayes_score: 0.0686746 -> 0.06867457
recipients: + pitrou, loewis, gregory.p.smith, alexandre.vassalotti
2008-07-21 22:59:12pitroulinkissue2523 messages
2008-07-21 22:59:11pitroucreate