[issue26714] telnetlib.Telnet should act as a context manager
Gregory P. Smith
report at bugs.python.org
Fri Apr 8 13:44:51 EDT 2016
New submission from Gregory P. Smith:
Telnet instances should support the context manager protocol so they can be used in with statements.
>>> import telnetlib
>>> with telnetlib.Telnet('192.168.86.7') as tn:
... pass
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: __exit__
----------
components: Library (Lib)
keywords: easy
messages: 263031
nosy: gregory.p.smith
priority: normal
severity: normal
status: open
title: telnetlib.Telnet should act as a context manager
type: enhancement
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26714>
_______________________________________
More information about the Python-bugs-list
mailing list