Skip to content

Doc: fix example for iter function - #11959

Merged
serhiy-storchaka merged 1 commit into
python:masterfrom
ciupicri:patch-1
Feb 21, 2019
Merged

serhiy-storchaka merged 1 commit into
python:masterfrom
ciupicri:patch-1

Conversation

@ciupicri

Copy link
Copy Markdown
Contributor

read returns bytes for a file opened in binary mode,
so b'' should be used as a sentinel instead of ''.
Otherwise the loop will be infinite.

read returns bytes for a file opened in binary mode,
so b'' should be used as a sentinel instead of ''.
Otherwise the loop will be infinite.
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @ciupicri for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 21, 2019
read() returns bytes for a file opened in binary mode,
so b'' should be used as a sentinel instead of ''.
Otherwise the loop will be infinite.
(cherry picked from commit 11fa0e4)

Co-authored-by: Cristian Ciupitu <cristian.ciupitu@yahoo.com>
@bedevere-bot

Copy link
Copy Markdown

GH-11971 is a backport of this pull request to the 3.7 branch.

@serhiy-storchaka

Copy link
Copy Markdown
Member

Thank you for your contribution @ciupicri!

miss-islington added a commit that referenced this pull request Feb 21, 2019
read() returns bytes for a file opened in binary mode,
so b'' should be used as a sentinel instead of ''.
Otherwise the loop will be infinite.
(cherry picked from commit 11fa0e4)

Co-authored-by: Cristian Ciupitu <cristian.ciupitu@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants