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 <rep...@bugs.python.org>
<http://bugs.python.org/issue26714>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to