Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3726)

Delta Between Two Patch Sets: Lib/nntplib.py

Issue 19689: ssl.create_default_context()
Left Patch Set: Created 5 years, 4 months ago
Right Patch Set: Created 5 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/imaplib.py ('k') | Lib/poplib.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 """An NNTP client class based on: 1 """An NNTP client class based on:
2 - RFC 977: Network News Transfer Protocol 2 - RFC 977: Network News Transfer Protocol
3 - RFC 2980: Common NNTP Extensions 3 - RFC 2980: Common NNTP Extensions
4 - RFC 3977: Network News Transfer Protocol (version 2) 4 - RFC 3977: Network News Transfer Protocol (version 2)
5 5
6 Example: 6 Example:
7 7
8 >>> from nntplib import NNTP 8 >>> from nntplib import NNTP
9 >>> s = NNTP('news') 9 >>> s = NNTP('news')
10 >>> resp, count, first, last, name = s.group('comp.lang.python') 10 >>> resp, count, first, last, name = s.group('comp.lang.python')
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 resp, overviews = s.xover(first, last) 1125 resp, overviews = s.xover(first, last)
1126 for artnum, over in overviews: 1126 for artnum, over in overviews:
1127 author = decode_header(over['from']).split('<', 1)[0] 1127 author = decode_header(over['from']).split('<', 1)[0]
1128 subject = decode_header(over['subject']) 1128 subject = decode_header(over['subject'])
1129 lines = int(over[':lines']) 1129 lines = int(over[':lines'])
1130 print("{:7} {:20} {:42} ({})".format( 1130 print("{:7} {:20} {:42} ({})".format(
1131 artnum, cut(author, 20), cut(subject, 42), lines) 1131 artnum, cut(author, 20), cut(subject, 42), lines)
1132 ) 1132 )
1133 1133
1134 s.quit() 1134 s.quit()
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+