Message99336
http://docs.python.org/whatsnew/2.6.html#writing-context-managers
penultimate item in "A high-level explanation": <quote>
If BLOCK raises an exception, the __exit__(type, value, traceback)() is called
</quote> has extra () after the argument list - this appears to say that __exit__ should return a callable, that shall be called with no parameters. Fortunately, later example code reveals that __exit__ simply returns true or false.
http://docs.python.org/whatsnew/2.6.html#the-contextlib-module
after the first code block: <quote>
The contextlib module also has a nested(mgr1, mgr2, ...)() function
</quote> again, stray () after parameter list.
After the next short code snippet: <quote>
Finally, the closing(object)() function returns ...
</quote> |
|
Date |
User |
Action |
Args |
2010-02-14 06:53:14 | eddy | set | recipients:
+ eddy, georg.brandl |
2010-02-14 06:53:14 | eddy | set | messageid: <1266130394.53.0.910004543029.issue7926@psf.upfronthosting.co.za> |
2010-02-14 06:52:13 | eddy | link | issue7926 messages |
2010-02-14 06:52:12 | eddy | create | |
|