From b093162208707b694d0764e6973ae34f77563111 Mon Sep 17 00:00:00 2001 From: krahets Date: Wed, 17 May 2023 04:46:55 +0800 Subject: [PATCH] Fix my_list.py --- codes/python/chapter_array_and_linkedlist/my_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/python/chapter_array_and_linkedlist/my_list.py b/codes/python/chapter_array_and_linkedlist/my_list.py index fda11760c..10ba62192 100644 --- a/codes/python/chapter_array_and_linkedlist/my_list.py +++ b/codes/python/chapter_array_and_linkedlist/my_list.py @@ -11,7 +11,7 @@ class MyList: def __init__(self): """构造方法""" self.__capacity: int = 10 # 列表容量 - self.__nums: my_list[int] = [0] * self.__capacity # 数组(存储列表元素) + self.__nums: list[int] = [0] * self.__capacity # 数组(存储列表元素) self.__size: int = 0 # 列表长度(即当前元素数量) self.__extend_ratio: int = 2 # 每次列表扩容的倍数