finished #stdio and #redirect sections, added xrefs in appendix B, added new example file

This commit is contained in:
Mark Pilgrim
2009-07-19 12:01:22 -04:00
parent 7e21f9ce71
commit 97d84abb5e
3 changed files with 116 additions and 96 deletions
+2
View File
@@ -759,6 +759,8 @@ def __exit__(self, *args):
<p><span class=u>&#x261E;</span>The <code>__exit__()</code> method will always be called, even if an exception is raised inside the <code>with</code> block. In fact, if an exception is raises, the exception information will be passed to the <code>__exit__()</code> method. See <a href=http://www.python.org/doc/3.0/reference/datamodel.html#with-statement-context-managers>With Statement Context Managers</a> for more details.
</blockquote>
<p>For more on context managers, see <a href=files.html#with>Closing Files Automatically</a> and <a href=files.html#redirect>Redirecting Standard Output</a>.
<h2 id=esoterica>Really Esoteric Stuff</h2>
<p>If you know what you&#8217;re doing, you can gain almost complete control over how classes are compared, how attributes are defined, and what kinds of classes are considered subclasses of your class.