Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit677d4bc

Browse files
authored
Remove unnecessary while in SocketIO.readinto (GH-111057)
It is unnecessary after removing "continue" in6e6c59b (bpo-42357).
1 parentc9aef19 commit677d4bc

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

‎Lib/socket.py‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -702,16 +702,15 @@ def readinto(self, b):
702702
self._checkReadable()
703703
ifself._timeout_occurred:
704704
raiseOSError("cannot read from timed out object")
705-
whileTrue:
706-
try:
707-
returnself._sock.recv_into(b)
708-
excepttimeout:
709-
self._timeout_occurred=True
710-
raise
711-
excepterrorase:
712-
ife.errnoin_blocking_errnos:
713-
returnNone
714-
raise
705+
try:
706+
returnself._sock.recv_into(b)
707+
excepttimeout:
708+
self._timeout_occurred=True
709+
raise
710+
excepterrorase:
711+
ife.errnoin_blocking_errnos:
712+
returnNone
713+
raise
715714

716715
defwrite(self,b):
717716
"""Write the given bytes or bytearray object *b* to the socket

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp