aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 05d2f8ccd73..18c91746fd7 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -1099,10 +1099,7 @@ if __name__ == '__main__':
toaddrs = prompt("To").split(',')
print("Enter message, end with ^D:")
msg = ''
- while 1:
- line = sys.stdin.readline()
- if not line:
- break
+ while line := sys.stdin.readline():
msg = msg + line
print("Message length is %d" % len(msg))