技术学习
文章平均质量分 91
solodom
这个作者很懒,什么都没留下…
展开
-
Python Basics---Chapter6 Abstraction (1)
Contents1. An example of programme2. str.split()1. An example of programme#store the full namedef store(data,full_name): # str.split() fnlist=full_name.split() if len(fnlist)==2: ...原创 2018-10-30 15:19:21 · 139 阅读 · 0 评论 -
Multiprocessing(1)---Pool
ContentsExample 1 The use of multiprocessing.PoolProgramOutputAnnotationAttentionExample 1 The use of multiprocessing.PoolProgramfrom multiprocessing import Pool # with first alphebet capitalimpor...原创 2018-11-22 16:31:46 · 376 阅读 · 0 评论 -
Python Basics (7) --- Generators
Contents1. Generators2. yield statement1. GeneratorsGenenrators are any functions that have a yield statement.2. yield statementInside a function, when the program meets the return statement,it...原创 2018-11-12 16:58:42 · 129 阅读 · 0 评论 -
Python Basics(8)---Modules
Contents1. Modules are programs2. Modules Are Used to Define Things3. Adding Test Code for modules4. Making Your Modules Available5. Attention on sequence slice6. Packages7. Exploring Modules8. Attent...原创 2018-11-13 14:53:57 · 136 阅读 · 0 评论 -
Python Basics---Chapter9 Magic Methods, Properties, and Iterators
Contents1. Preface2. Constructor __ init __3. super function3. Protocol of Python4. The Basic Sequence and Mapping Protocol5. Example: Creat a Infinite Sequence6. The property function1. PrefaceIn ...原创 2018-11-10 17:38:12 · 170 阅读 · 0 评论 -
Python Basics---Chapter8 Exceptions
Contents1. What is an exception?2. The raise statement3. Custom Exception Class4. Catch and handle the exception5. raise without arguments6. raise another exception7. Catch more than one exception8. C...原创 2018-11-07 14:19:19 · 196 阅读 · 0 评论 -
Python Bssics--- Chapter7 MakingYour Own Objects
ContentsThe Magic of Objects1. Polymorphism(1) First example==choice()====count()==(2) Second example==repr()==2. Encapsulation3. InheritanceClassThe Magic of ObjectsIn object-oriented programming...原创 2018-11-04 16:46:57 · 197 阅读 · 0 评论 -
Python Basics ---Chapter6 Abstraction (2)
“I wanted you to see what real courage is, instead of getting the idea that courage is a man with a gun in his hand. It’s when you know you’re licked before you begin, but you begin anyway and see it...原创 2018-11-02 16:57:49 · 200 阅读 · 0 评论 -
Python Basics---Chapter6 Abstraction (3)
ContentsScoping1. vars()2. The scope of varibles3. globals() and locals()4. Read global varibles inside a function5. Nested ScopeScoping1. vars()vars() : return the scoping dictionary of a varible...原创 2018-11-03 19:37:32 · 193 阅读 · 0 评论 -
multiprocessing(2)---communication between subprocesses
ContentsQueueProgramOutputPipeProgramOutputQueueUsed among multiple processes.Programfrom multiprocessing import Process, Queueimport os, random, time# define the write functiondef proc_writ...原创 2018-11-22 22:08:47 · 117 阅读 · 0 评论