65. Only want some functions in module
65
from 應用藝術研究所同學名單 import 郭同學 as 郭
郭()
from 應用藝術研究所同學名單 import 郭同學
郭同學()
應用藝術研究
所同學名單
姚同學
郭同學
林同學
只需要 郭同學
66. Only want some functions in module
66
from a_module import methodB as B
B()
from a_module import methodB
methodB()
a_module
methodA
methodB
methodC
只需要 methodB
67. Value & naming
● python 只有 name 沒有
variable
● name refer to variable
● many name can refer to
one value
● Names are reassigned
independently
● [Python Names]
67
95. 95
use Multiprocess package
from multiprocessing import Pool
...
...
URLs = ['ptt網址', 'ptt網址2', ...]
with Pool(processes=4) as pool:
contents = pool.map(crawler, URLs)