-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
smtplib context manager #55498
Comments
Patch in attachment provides a context manager for SMTP class so that it can be used with the "with" statement. |
you didn't attach anything, Giampaolo. |
Ouch! Here. =) |
is print really necessary in the test? Also, I think it would be better to unpack the tuple in test, rather then index it. |
no, my mistake |
A couple more minor issues:
|
Thanks for the contribution! It seems like a reasonable new feature, so I'll get this landed in 3.3. Probably should use :versionadded: instead (thanks gps). I'll address SilentGhost's issues in the commit. |
@barry I have commit privileges, but no problem if you want to commit it. |
On Mar 15, 2011, at 06:40 PM, Giampaolo Rodola' wrote:
@giampaolo: I'd like to do it (and am almost ready to), mostly to test out hg |
Go on, no prob. |
New changeset a6a94cfb75e9 by Barry Warsaw in branch 'default':
|
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: