On 18.04.2011 21:39, R. David Murray wrote: >> > +Policy objects are the mechanism used to provide the email package with >> > the >> > +flexibility to handle all these disparate use cases, >> >> Looks like something is missing from this sentence :) > > Éric thought so too, but it reads fine to me. Maybe it is colloquial > grammar and I'm just blind to it. I can't now remember what his suggested > modification was, either. I've rewritten it as: > > Policy objects give the email package the flexibility to handle all > these disparate use cases.
Sure, I was only asking because the original ended in a trailing comma. >> > + >>> from email import msg_from_binary_file >> > + >>> from email.generator import BytesGenerator >> > + >>> import email.policy >> > + >>> from subprocess import Popen, PIPE >> > + >>> with open('mymsg.txt', 'b') as f: >> > + >>> msg = msg_from_binary_file(f, policy=email.policy.mbox) >> > + >>> p = Popen(['sendmail', msg['To'][0].address], stdin=PIPE) >> > + >>> g = BytesGenerator(p.stdin, email.policy.policy=SMTP) >> >> That keyword arg doesn't look right. > > Yep, I got that backward when I edited it. > >> > + >>> g.flatten(msg) >> > + >>> p.stdin.close() >> > + >>> rc = p.wait() >> >> Also, if you put interactive prompts, please use them correctly ("..." prompt >> and one blank line for the with block). > > Éric had me fix one example of that already. What do you mean by "one > blank line" though? Doctest doesn't require blank lines after the ... > lines, does it? Not sure what doctest requires, but in the actual interactive shell you'd have >>> with ...: ... do something ... >>> next statement It's not really important though. Georg _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com