[New-bugs-announce] [issue7926] Stray parentheses() in context manager "what's new" doc

Edward Welbourne report at bugs.python.org
Sun Feb 14 07:53:14 CET 2010


New submission from Edward Welbourne <eddy at chaos.org.uk>:

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>

----------
assignee: georg.brandl
components: Documentation
messages: 99336
nosy: eddy, georg.brandl
severity: normal
status: open
title: Stray parentheses() in context manager "what's new" doc
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7926>
_______________________________________


More information about the New-bugs-announce mailing list