Message109920
In python 2.7 a module can't be used as a context manager.
For example, given the module, t.py:
def __enter__(*args):
print 'enter', args
def __exit__(*args):
print 'exit', args
In Python 2.6:
>>> import t
>>> with t: pass
...
enter ()
exit (None, None, None)
In Python 2.7:
>>> import t
>>> with t: pass
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: __exit__ |
|
Date |
User |
Action |
Args |
2010-07-10 19:52:30 | j1m | set | recipients:
+ j1m |
2010-07-10 19:52:30 | j1m | set | messageid: <1278791550.43.0.759341928181.issue9220@psf.upfronthosting.co.za> |
2010-07-10 19:52:28 | j1m | link | issue9220 messages |
2010-07-10 19:52:28 | j1m | create | |
|