[New-bugs-announce] [issue4972] let's equip ftplib.FTP with __enter__ and __exit__
Tarek Ziadé
report at bugs.python.org
Sat Jan 17 18:28:58 CET 2009
New submission from Tarek Ziadé <ziade.tarek at gmail.com>:
In a program, I naturally wrote:
>>> from ftplib import FTP
>>> with FTP('ftp.somewhere.com') as ftp:
... ftp.login('someone', 'pass')
... ...
Until I realized this class is not equipped with __enter__ and __exit__,
I think it could be a simple and pleasant enhancement to add it.
----------
components: Library (Lib)
messages: 80026
nosy: tarek
severity: normal
status: open
title: let's equip ftplib.FTP with __enter__ and __exit__
type: feature request
versions: Python 2.7, Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4972>
_______________________________________
More information about the New-bugs-announce
mailing list