回答編集履歴

2

とりあえず

2019/02/10 15:21

投稿

hayataka2049
hayataka2049

スコア30933

test CHANGED
@@ -54,7 +54,7 @@
54
54
 
55
55
  q = "恋するフォーチュンクッキー"
56
56
 
57
- result = [x for x in p.map(process, ((t, q) for x in targets)) if x]
57
+ result = [x for x in p.map(process, ((t, q) for t in targets)) if x]
58
58
 
59
59
  print(result)
60
60
 

1

下だった

2019/02/10 15:21

投稿

hayataka2049
hayataka2049

スコア30933

test CHANGED
@@ -20,9 +20,7 @@
20
20
 
21
21
 
22
22
 
23
- def files(args):
23
+ def files(path):
24
-
25
- path, q = args
26
24
 
27
25
  for pathname, dirnames, filenames in os.walk(path):
28
26
 
@@ -32,7 +30,9 @@
32
30
 
33
31
 
34
32
 
35
- def process(path):
33
+ def process(args):
34
+
35
+ path, q = args
36
36
 
37
37
  with open(path) as f:
38
38