New submission from Antoine Pitrou <pit...@free.fr>:

I haven't investigated but this is weird (especially the fact that it doesn't 
*always* happen). There might be a problem with SETUP_WITH or perhaps the 
method cache:

>>> import bz2
>>> f = bz2.BZ2File('foo.bz2', 'wb')
>>> with f: pass
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: __exit__
>>> f.__enter__().__exit__(None, None, None)
>>>

----------
components: Interpreter Core, Library (Lib)
messages: 117210
nosy: amaury.forgeotdarc, arigo, benjamin.peterson, pitrou
priority: normal
severity: normal
status: open
title: weird oddity with bz2 context manager
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9928>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to