teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

誤字修正

2020/07/06 12:47

投稿

nico25
nico25

スコア830

answer CHANGED
@@ -9,4 +9,23 @@
9
9
 
10
10
  ```
11
11
  'float' object is not callable
12
+ ```
13
+
14
+ 組み込み関数 `callable` を使うと伝わりやすいかもしれません。
15
+
16
+ ```
17
+ def f():
18
+ pass
19
+
20
+ y = 0
21
+
22
+ callable(f)
23
+ callable(x)
24
+ ```
25
+ ```
26
+ >>> callable(f)
27
+ True
28
+ >>> callable(y)
29
+ False
30
+ >>>
12
31
  ```