⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 contents.htm

📁 this is the most basic to learn python
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<!--
This document was converted from RTF source: 
By rtftohtml 4.19
See http://www.sunpack.com/RTF
Filename:TIPython.rtf
Application Directory:c:\tools\rtf2html\
Subject:
Author:Bruce Eckel
Operator:Bruce Eckel
Document Comments:
Version Comments:
Comments:
Keywords:
Translation Date:12/31/2001
Translation Time:08:24:10
Translation Platform:Win32
Number of Output files:18
This File:Contents.htm
SplitDepth=1
SkipNavPanel=1
SkipLeadingToc=1
SkipTrailingToc=1
GenContents=1
GenFrames=1
GenIndex=1
-->
<HEAD lang="en"><META http-equiv="Content-Type" content="text/html">
<TITLE>Thinking in Python, Revision 0.1.2 (12/31/01) -- Incomplete and Unfinished - Contents</TITLE>

<script language="JavaScript">
</script>
</head>


<BODY  BGCOLOR="#FFFFFF"><H1>Thinking in Python, Revision 0.1.2 (12/31/01) -- Incomplete and Unfinished - Contents </H1></FONT>
<H2><A HREF="FrontMtr.htm">Thinking in Python, Revision 0.1.2 (12/31/01) -- Incomplete and Unfinished - Title Page </A></H2></FONT>
<UL>
<A HREF="Preface.htm">Preface</A><BR>
<A HREF="Intro.htm">Introduction</A><BR>
<UL>
<A HREF="Intro.htm#Heading3">The Y2K syndrome</A><BR>
<A HREF="Intro.htm#Heading4">Context and composition</A><BR>
</UL>
<A HREF="Sect01.htm">A quick course in Python for programmers</A><BR>
<UL>
<A HREF="Sect01.htm#Heading6">Python overview</A><BR>
<UL>
<A HREF="Sect01.htm#Heading7">Built-in containers</A><BR>
<A HREF="Sect01.htm#Heading8">Functions</A><BR>
<A HREF="Sect01.htm#Heading9">Strings</A><BR>
<A HREF="Sect01.htm#Heading10">Classes</A><BR>
<UL>
<A HREF="Sect01.htm#Heading11">Inheritance</A><BR>
</UL>
</UL>
</UL>
<A HREF="Sect02.htm">The pattern concept</A><BR>
<UL>
<A HREF="Sect02.htm#Heading13">What is a pattern?</A><BR>
<A HREF="Sect02.htm#Heading14">Pattern taxonomy</A><BR>
<A HREF="Sect02.htm#Heading15">Design Structures</A><BR>
<A HREF="Sect02.htm#Heading16">Design principles</A><BR>
<A HREF="Sect02.htm#Heading17">The Singleton</A><BR>
<UL>
<A HREF="Sect02.htm#Heading18">Exercise:</A><BR>
</UL>
<A HREF="Sect02.htm#Heading19">Classifying patterns</A><BR>
<A HREF="Sect02.htm#Heading20">The development challenge</A><BR>
<A HREF="Sect02.htm#Heading21">Exercises</A><BR>
</UL>
<A HREF="Sect03.htm">2: Unit Testing</A><BR>
<UL>
<A HREF="Sect03.htm#Heading23">Write tests first</A><BR>
<A HREF="Sect03.htm#Heading24">Simple Python testing</A><BR>
<A HREF="Sect03.htm#Heading25">A very simple framework</A><BR>
<A HREF="Sect03.htm#Heading26">Writing tests</A><BR>
<A HREF="Sect03.htm#Heading27">White-box &amp; black-box tests</A><BR>
<A HREF="Sect03.htm#Heading28">Running tests</A><BR>
<A HREF="Sect03.htm#Heading29">Automatically executing tests</A><BR>
<A HREF="Sect03.htm#Heading30">Exercises</A><BR>
</UL>
<A HREF="Sect04.htm">3: Building application frameworks</A><BR>
<UL>
<A HREF="Sect04.htm#Heading32">Template method</A><BR>
<A HREF="Sect04.htm#Heading33">Exercises</A><BR>
</UL>
<A HREF="Sect05.htm">4:Fronting for an implementation</A><BR>
<UL>
<A HREF="Sect05.htm#Heading35">Proxy</A><BR>
<A HREF="Sect05.htm#Heading36">State</A><BR>
<A HREF="Sect05.htm#Heading37">StateMachine</A><BR>
<A HREF="Sect05.htm#Heading38">Table-Driven State Machine</A><BR>
<UL>
<A HREF="Sect05.htm#Heading39">The State class</A><BR>
<A HREF="Sect05.htm#Heading40">Conditions for transition</A><BR>
<A HREF="Sect05.htm#Heading41">Transition actions</A><BR>
<A HREF="Sect05.htm#Heading42">The table</A><BR>
<A HREF="Sect05.htm#Heading43">The basic machine</A><BR>
<A HREF="Sect05.htm#Heading44">Simple vending machine</A><BR>
<A HREF="Sect05.htm#Heading45">Testing the machine</A><BR>
</UL>
<A HREF="Sect05.htm#Heading46">Tools</A><BR>
<A HREF="Sect05.htm#Heading47">Exercises</A><BR>
</UL>
<A HREF="Sect06.htm">X: Decorators: dynamic type selection</A><BR>
<UL>
<A HREF="Sect06.htm#Heading49">Basic decorator structure</A><BR>
<A HREF="Sect06.htm#Heading50">A coffee example</A><BR>
<A HREF="Sect06.htm#Heading51">Class for each combination </A><BR>
<A HREF="Sect06.htm#Heading52">The decorator approach</A><BR>
<A HREF="Sect06.htm#Heading53">Compromise</A><BR>
<A HREF="Sect06.htm#Heading54">Other considerations</A><BR>
<A HREF="Sect06.htm#Heading55">Exercises</A><BR>
</UL>
<A HREF="Sect07.htm">Y: Iterators: decoupling algorithms from containers</A><BR>
<UL>
<A HREF="Sect07.htm#Heading57">Type-safe iterators</A><BR>
</UL>
<A HREF="Sect08.htm">5: Factories: encapsulating object creation</A><BR>
<UL>
<A HREF="Sect08.htm#Heading59">Simple Factory method</A><BR>
<A HREF="Sect08.htm#Heading60">Polymorphic factories</A><BR>
<A HREF="Sect08.htm#Heading61">Abstract factories</A><BR>
<A HREF="Sect08.htm#Heading62">Exercises</A><BR>
</UL>
<A HREF="Sect09.htm">6: Function objects</A><BR>
<UL>
<A HREF="Sect09.htm#Heading64">Command: choosing the operation at run-time</A><BR>
<A HREF="Sect09.htm#Heading65">Strategy: choosing the algorithm at run-time</A><BR>
<A HREF="Sect09.htm#Heading66">Chain of responsibility</A><BR>
<A HREF="Sect09.htm#Heading67">Exercises</A><BR>
</UL>
<A HREF="Sect10.htm">7: Changing the interface</A><BR>
<UL>
<A HREF="Sect10.htm#Heading69">Adapter</A><BR>
<A HREF="Sect10.htm#Heading70">Fa&ccedil;ade</A><BR>
<A HREF="Sect10.htm#Heading71">Exercises</A><BR>
</UL>
<A HREF="Sect11.htm">8: Table-driven code: configuration flexibility</A><BR>
<UL>
<A HREF="Sect11.htm#Heading73">Table-driven code using anonymous inner classes</A><BR>
</UL>
<A HREF="Sect12.htm">10: Callbacks</A><BR>
<UL>
<A HREF="Sect12.htm#Heading75">Observer</A><BR>
<UL>
<A HREF="Sect12.htm#Heading76">Observing flowers</A><BR>
</UL>
<A HREF="Sect12.htm#Heading77">A visual example of observers</A><BR>
<A HREF="Sect12.htm#Heading78">Exercises</A><BR>
</UL>
<A HREF="Sect13.htm">11: Multiple dispatching</A><BR>
<UL>
<A HREF="Sect13.htm#Heading80">Visitor, a type of multiple dispatching</A><BR>
<A HREF="Sect13.htm#Heading81">Exercises</A><BR>
</UL>
<A HREF="Sect14.htm">12: Pattern refactoring</A><BR>
<UL>
<A HREF="Sect14.htm#Heading83">Simulating the trash recycler</A><BR>
<A HREF="Sect14.htm#Heading84">Improving the design</A><BR>
<UL>
<A HREF="Sect14.htm#Heading85">&#147;Make more objects&#148;</A><BR>
</UL>
<A HREF="Sect14.htm#Heading86">A pattern for prototyping creation</A><BR>
<UL>
<A HREF="Sect14.htm#Heading87">Trash subclasses</A><BR>
<A HREF="Sect14.htm#Heading88">Parsing Trash from an external file</A><BR>
<A HREF="Sect14.htm#Heading89">Recycling with prototyping</A><BR>
</UL>
<A HREF="Sect14.htm#Heading90">Abstracting usage</A><BR>
<A HREF="Sect14.htm#Heading91">Multiple dispatching</A><BR>
<UL>
<A HREF="Sect14.htm#Heading92">Implementing the double dispatch</A><BR>
</UL>
<A HREF="Sect14.htm#Heading93">The Visitor pattern</A><BR>
<UL>
<A HREF="Sect14.htm#Heading94">A Reflective Decorator</A><BR>
<A HREF="Sect14.htm#Heading95">More coupling?</A><BR>
</UL>
<A HREF="Sect14.htm#Heading96">RTTI considered harmful?</A><BR>
<A HREF="Sect14.htm#Heading97">Summary</A><BR>
<A HREF="Sect14.htm#Heading98">Exercises</A><BR>
</UL>
<A HREF="Sect15.htm">13: Projects</A><BR>
<UL>
<A HREF="Sect15.htm#Heading100">Rats &amp; Mazes</A><BR>
<UL>
<A HREF="Sect15.htm#Heading101">Other maze resources</A><BR>
</UL>
<A HREF="Sect15.htm#Heading102">XML Decorator</A><BR>
</UL>
</UL>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -