Skip to content

Commit 015cf02

Browse files
authored
Fix typo in clear_dict callable creation
1 parent fbeb7f3 commit 015cf02

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

8.callable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ var callable = print_args # 指向类中创建的方法
186186
var free = queue_free # 指向 Node 的方法,来自于父类
187187
var clear_arr = arr.clear # 指向 数组 实例的方法
188188
# var clear_dict = dict.clear # 不行,由于字典存在点语法,"clear"被视为一个键
189-
var clear_dict = Callable.create(dict, "claer") # 使用create静态方法创建Callable,指向字典的clear方法
189+
var clear_dict = Callable.create(dict, "clear") # 使用create静态方法创建Callable,指向字典的clear方法
190190
191191
func print_args(arg1, arg2, arg3 = ""):
192192
prints(arg1, arg2, arg3)

0 commit comments

Comments
 (0)