File: summary.html

package info (click to toggle)
diveintopython 5.4-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 4,116 kB
  • ctags: 2,838
  • sloc: python: 4,417; xml: 894; makefile: 29
file content (85 lines) | stat: -rw-r--r-- 7,532 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   
      <title>5.10.&nbsp;Summary</title>
      <link rel="stylesheet" href="../diveintopython.css" type="text/css">
      <link rev="made" href="mailto:f8dy@diveintopython.org">
      <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
      <meta name="keywords" content="Python, Dive Into Python, tutorial, object-oriented, programming, documentation, book, free">
      <meta name="description" content="Python from novice to pro">
      <link rel="home" href="../toc/index.html" title="Dive Into Python">
      <link rel="up" href="index.html" title="Chapter&nbsp;5.&nbsp;Objects and Object-Orientation">
      <link rel="previous" href="private_functions.html" title="5.9.&nbsp;Private Functions">
      <link rel="next" href="../file_handling/index.html" title="Chapter&nbsp;6.&nbsp;Exceptions and File Handling">
   </head>
   <body>
      <table id="Header" width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
         <tr>
            <td id="breadcrumb" colspan="5" align="left" valign="top">You are here: <a href="../index.html">Home</a>&nbsp;&gt;&nbsp;<a href="../toc/index.html">Dive Into Python</a>&nbsp;&gt;&nbsp;<a href="index.html">Objects and Object-Orientation</a>&nbsp;&gt;&nbsp;<span class="thispage">Summary</span></td>
            <td id="navigation" align="right" valign="top">&nbsp;&nbsp;&nbsp;<a href="private_functions.html" title="Prev: &#8220;Private Functions&#8221;">&lt;&lt;</a>&nbsp;&nbsp;&nbsp;<a href="../file_handling/index.html" title="Next: &#8220;Exceptions and File Handling&#8221;">&gt;&gt;</a></td>
         </tr>
         <tr>
            <td colspan="3" id="logocontainer">
               <h1 id="logo"><a href="../index.html" accesskey="1">Dive Into Python</a></h1>
               <p id="tagline">Python from novice to pro</p>
            </td>
            <td colspan="3" align="right">
               <form id="search" method="GET" action="http://www.google.com/custom">
                  <p><label for="q" accesskey="4">Find:&nbsp;</label><input type="text" id="q" name="q" size="20" maxlength="255" value=" "> <input type="submit" value="Search"><input type="hidden" name="cof" value="LW:752;L:http://diveintopython.org/images/diveintopython.png;LH:42;AH:left;GL:0;AWFID:3ced2bb1f7f1b212;"><input type="hidden" name="domains" value="diveintopython.org"><input type="hidden" name="sitesearch" value="diveintopython.org"></p>
               </form>
            </td>
         </tr>
      </table>
      <!--#include virtual="/inc/ads" -->
      <div class="section" lang="en">
         <div class="titlepage">
            <div>
               <div>
                  <h2 class="title"><a name="fileinfo.summary"></a>5.10.&nbsp;Summary
                  </h2>
               </div>
            </div>
            <div></div>
         </div>
         <div class="abstract">
            <p>That's it for the hard-core object trickery.  You'll see a real-world application of special class methods in <a href="../soap_web_services/index.html">Chapter 12</a>, which uses <tt class="function">getattr</tt> to create a proxy to a remote web service.
            </p>
         </div>
         <p>The next chapter will continue using this code sample to explore other <span class="application">Python</span> concepts, such as exceptions, file objects, and <tt class="literal">for</tt> loops.
         </p>
         <p>Before diving into the next chapter, make sure you're comfortable doing all of these things:</p>
         <div class="itemizedlist">
            <ul>
               <li>Importing modules using either <a href="../getting_to_know_python/everything_is_an_object.html#odbchelper.import" title="Example&nbsp;2.3.&nbsp;Accessing the buildConnectionString Function's doc string"><tt class="literal">import <i class="replaceable">module</i></tt></a> or <a href="importing_modules.html" title="5.2.&nbsp;Importing Modules Using from module import"><tt class="literal">from <i class="replaceable">module</i> import</tt></a></li>
               <li><a href="defining_classes.html" title="5.3.&nbsp;Defining Classes">Defining</a> and <a href="instantiating_classes.html" title="5.4.&nbsp;Instantiating Classes">instantiating</a> classes
               </li>
               <li>Defining <a href="defining_classes.html#fileinfo.class.example" title="Example&nbsp;5.4.&nbsp;Defining the FileInfo Class"><tt class="function">__init__</tt> methods</a> and other <a href="special_class_methods.html" title="5.6.&nbsp;Special Class Methods">special class methods</a>, and understanding when they are called
               </li>
               <li>Subclassing <a href="userdict.html" title="5.5.&nbsp;Exploring UserDict: A Wrapper Class"><tt class="classname">UserDict</tt></a> to define classes that act like dictionaries
               </li>
               <li>Defining <a href="userdict.html#fileinfo.userdict.init.example" title="Example&nbsp;5.9.&nbsp;Defining the UserDict Class">data attributes</a> and <a href="class_attributes.html" title="5.8.&nbsp;Introducing Class Attributes">class attributes</a>, and understanding the differences between them
               </li>
               <li>Defining <a href="private_functions.html" title="5.9.&nbsp;Private Functions">private attributes and methods</a></li>
            </ul>
         </div>
      </div>
      <table class="Footer" width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
         <tr>
            <td width="35%" align="left"><br><a class="NavigationArrow" href="private_functions.html">&lt;&lt;&nbsp;Private Functions</a></td>
            <td width="30%" align="center"><br>&nbsp;<span class="divider">|</span>&nbsp;<a href="index.html#fileinfo.divein" title="5.1.&nbsp;Diving In">1</a> <span class="divider">|</span> <a href="importing_modules.html" title="5.2.&nbsp;Importing Modules Using from module import">2</a> <span class="divider">|</span> <a href="defining_classes.html" title="5.3.&nbsp;Defining Classes">3</a> <span class="divider">|</span> <a href="instantiating_classes.html" title="5.4.&nbsp;Instantiating Classes">4</a> <span class="divider">|</span> <a href="userdict.html" title="5.5.&nbsp;Exploring UserDict: A Wrapper Class">5</a> <span class="divider">|</span> <a href="special_class_methods.html" title="5.6.&nbsp;Special Class Methods">6</a> <span class="divider">|</span> <a href="special_class_methods2.html" title="5.7.&nbsp;Advanced Special Class Methods">7</a> <span class="divider">|</span> <a href="class_attributes.html" title="5.8.&nbsp;Introducing Class Attributes">8</a> <span class="divider">|</span> <a href="private_functions.html" title="5.9.&nbsp;Private Functions">9</a> <span class="divider">|</span> <span class="thispage">10</span>&nbsp;<span class="divider">|</span>&nbsp;
            </td>
            <td width="35%" align="right"><br><a class="NavigationArrow" href="../file_handling/index.html">Exceptions and File Handling&nbsp;&gt;&gt;</a></td>
         </tr>
         <tr>
            <td colspan="3"><br></td>
         </tr>
      </table>
      <div class="Footer">
         <p class="copyright">Copyright &copy; 2000, 2001, 2002, 2003, 2004 <a href="mailto:mark@diveintopython.org">Mark Pilgrim</a></p>
      </div>
   </body>
</html>