Skip to content

Commit 199c6f0

Browse files
committed
修复了扩展类型List的一些bug
修复了toStringList()方法和toIntegerList()方法使用后会变为原版类型的bug
1 parent 09781e2 commit 199c6f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

type.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
对Python原版类型的扩展
33
"""
44
__author__ = "Jerry"
5-
__version__ = "1.3.8"
5+
__version__ = "1.3.2"
66

77
__all__ = ["String", "Integer", "List"]
88

@@ -161,7 +161,7 @@ def __init__(self, int_) -> None:
161161
self.__int = int_
162162

163163
def __repr__(self) -> str:
164-
return str(self.__int)
164+
return self.toStr()
165165

166166
__str__ = __repr__
167167

@@ -378,7 +378,7 @@ def toStringList(self):
378378
stringList.append(String(i))
379379
else:
380380
stringList.append(i)
381-
return stringList
381+
return List(stringList)
382382

383383
def toIntegerList(self):
384384
"如果列表包含整数,返回一个将整数转为Integer对象的列表"
@@ -388,4 +388,4 @@ def toIntegerList(self):
388388
integerList.append(Integer(i))
389389
else:
390390
integerList.append(i)
391-
return integerList
391+
return List(integerList)

0 commit comments

Comments
 (0)