2022-07-14 08:36:02 +00:00
|
|
|
class Tuple:
|
2022-08-16 12:24:26 +08:00
|
|
|
def __init__(self): ...
|
2022-08-16 12:21:11 +08:00
|
|
|
|
|
|
|
def get(self, i: int) -> any:
|
2022-08-16 12:24:26 +08:00
|
|
|
"""get an arg by the index"""
|
2022-08-16 12:21:11 +08:00
|
|
|
|
|
|
|
def len(self) -> int:
|
2022-08-16 12:24:26 +08:00
|
|
|
"""get the length of list"""
|
2022-08-16 12:21:11 +08:00
|
|
|
|
|
|
|
def __iter__(self) -> any:
|
|
|
|
"""support for loop"""
|
|
|
|
|
|
|
|
def __next__(self) -> any:
|
2022-08-16 12:24:26 +08:00
|
|
|
"""support for loop"""
|
|
|
|
|
|
|
|
def __getitem__(self, __key: any) -> any:
|
2022-08-16 12:21:11 +08:00
|
|
|
"""support val = list[]"""
|
|
|
|
|
2022-06-11 14:56:51 +00:00
|
|
|
def __del__(self): ...
|
2022-06-24 03:30:56 +00:00
|
|
|
def __str__(self) -> str: ...
|
2022-06-24 18:18:06 +08:00
|
|
|
def __len__(self) -> int: ...
|
2021-12-13 22:14:59 +08:00
|
|
|
|
2022-09-05 15:39:15 +08:00
|
|
|
def __contains__(self, val: any) -> int:
|
|
|
|
""" support val in list """
|
|
|
|
|
2022-08-16 12:21:11 +08:00
|
|
|
|
2022-07-14 08:36:02 +00:00
|
|
|
class List(Tuple):
|
2022-08-16 12:24:26 +08:00
|
|
|
def __init__(self): ...
|
2022-08-16 12:21:11 +08:00
|
|
|
|
|
|
|
def append(self, arg: any):
|
2022-08-16 12:24:26 +08:00
|
|
|
"""add an arg after the end of list"""
|
2022-08-16 12:21:11 +08:00
|
|
|
|
|
|
|
def set(self, i: int, arg: any):
|
2022-08-16 12:24:26 +08:00
|
|
|
"""set an arg by the index"""
|
2022-08-16 12:21:11 +08:00
|
|
|
|
|
|
|
def reverse(self):
|
|
|
|
"""reverse the list"""
|
|
|
|
|
2022-08-16 12:24:26 +08:00
|
|
|
def __setitem__(self, __key: any, __val: any):
|
|
|
|
"""support list[] = val"""
|
|
|
|
|
2022-07-14 08:36:02 +00:00
|
|
|
def __str__(self) -> str: ...
|
|
|
|
|
2022-08-16 17:40:11 +08:00
|
|
|
def __add__(self, others: List) -> List:
|
|
|
|
""" support list + list"""
|
|
|
|
|
2022-08-16 12:21:11 +08:00
|
|
|
|
2022-07-14 08:36:02 +00:00
|
|
|
class Dict:
|
2022-06-01 11:46:59 +08:00
|
|
|
def __init__(self): ...
|
2021-12-13 22:14:59 +08:00
|
|
|
# get an arg by the key
|
2022-06-01 11:46:59 +08:00
|
|
|
def get(self, key: str) -> any: ...
|
2021-12-13 22:14:59 +08:00
|
|
|
# set an arg by the key
|
2022-06-01 11:46:59 +08:00
|
|
|
def set(self, key: str, arg: any): ...
|
2021-12-13 22:14:59 +08:00
|
|
|
# remove an arg by the key
|
2022-06-01 11:46:59 +08:00
|
|
|
def remove(self, key: str): ...
|
|
|
|
def __iter__(self) -> any: ...
|
|
|
|
def __next__(self) -> any: ...
|
2022-01-13 21:57:32 +08:00
|
|
|
# support dict[] = val
|
2022-07-29 23:40:16 +08:00
|
|
|
def __setitem__(self, __key: any, __val: any): ...
|
2022-05-27 17:09:16 +08:00
|
|
|
# support val = dict[]
|
2022-07-29 23:40:16 +08:00
|
|
|
def __getitem__(self, __key: any) -> any: ...
|
2022-06-11 14:56:51 +00:00
|
|
|
def __del__(self): ...
|
2022-06-24 03:30:56 +00:00
|
|
|
def __str__(self) -> str: ...
|
2022-06-23 17:46:50 +08:00
|
|
|
def keys(self) -> dict_keys: ...
|
2022-06-24 18:18:06 +08:00
|
|
|
def __len__(self) -> int: ...
|
2022-06-23 17:46:50 +08:00
|
|
|
|
2022-09-05 15:39:15 +08:00
|
|
|
def __contains__(self, val: any) -> int:
|
|
|
|
""" support val in list """
|
|
|
|
|
2022-08-16 12:21:11 +08:00
|
|
|
|
2022-07-14 08:36:02 +00:00
|
|
|
class dict_keys:
|
2022-06-23 17:46:50 +08:00
|
|
|
def __iter__(self) -> any: ...
|
|
|
|
def __next__(self) -> any: ...
|
2022-06-24 03:30:56 +00:00
|
|
|
def __str__(self) -> str: ...
|
2022-06-24 18:18:06 +08:00
|
|
|
def __len__(self) -> int: ...
|
2022-01-13 21:57:32 +08:00
|
|
|
|
2022-08-16 12:21:11 +08:00
|
|
|
|
2022-07-14 08:36:02 +00:00
|
|
|
class String:
|
2022-06-01 11:46:59 +08:00
|
|
|
def __init__(self, s: str): ...
|
|
|
|
def set(self, s: str): ...
|
|
|
|
def get(self) -> str: ...
|
|
|
|
def __iter__(self) -> any: ...
|
|
|
|
def __next__(self) -> any: ...
|
2022-01-13 21:57:32 +08:00
|
|
|
# support string[] = val
|
2022-07-29 23:40:16 +08:00
|
|
|
def __setitem__(self, __key: any, __val: any): ...
|
2022-05-27 17:09:16 +08:00
|
|
|
# support val = string[]
|
2022-07-29 23:40:16 +08:00
|
|
|
def __getitem__(self, __key: any) -> any: ...
|
2022-06-01 11:46:59 +08:00
|
|
|
# support str()
|
|
|
|
def __str__(self) -> str: ...
|
2022-06-24 18:18:06 +08:00
|
|
|
def __len__(self) -> int: ...
|
2022-07-14 11:54:25 +08:00
|
|
|
def encode(self) -> bytes: ...
|
2022-08-11 17:21:01 +08:00
|
|
|
def startswith(self, prefix: str) -> int: ...
|
|
|
|
def endswith(self, suffix: str) -> int: ...
|
2022-06-11 14:56:51 +00:00
|
|
|
def isdigit(self) -> int: ...
|
|
|
|
def islower(self) -> int: ...
|
|
|
|
def isalnum(self) -> int: ...
|
|
|
|
def isalpha(self) -> int: ...
|
|
|
|
def isspace(self) -> int: ...
|
2022-06-21 17:49:18 +08:00
|
|
|
def split(self, s: str) -> List: ...
|
2022-07-04 07:16:44 +00:00
|
|
|
def replace(self, old: str, new: str) -> str: ...
|
|
|
|
def strip(self) -> str: ...
|
2022-06-11 14:56:51 +00:00
|
|
|
|
2022-08-16 12:21:11 +08:00
|
|
|
|
2022-07-18 05:29:43 +00:00
|
|
|
class ByteArray:
|
2022-03-25 21:39:52 +08:00
|
|
|
# convert a string to ByteArray
|
2022-07-14 11:54:25 +08:00
|
|
|
def __init__(self, bytes: any): ...
|
|
|
|
# support for loop
|
|
|
|
def __iter__(self) -> any: ...
|
|
|
|
# support for loop
|
|
|
|
def __next__(self) -> any: ...
|
|
|
|
# support [] index
|
2022-07-29 23:40:16 +08:00
|
|
|
def __getitem__(self, __key: int) -> int: ...
|
|
|
|
def __setitem__(self, __key: int, __val: int): ...
|
2022-07-14 11:54:25 +08:00
|
|
|
def __str__(self) -> str: ...
|
|
|
|
def decode(self) -> str: ...
|
2022-05-27 17:09:16 +08:00
|
|
|
|
2022-08-16 12:21:11 +08:00
|
|
|
|
2022-07-15 02:06:23 +00:00
|
|
|
class FILEIO:
|
2022-08-06 17:59:32 +08:00
|
|
|
def init(self, path: str, mode: str) -> int: ...
|
2022-07-15 02:06:23 +00:00
|
|
|
def read(self, size: int) -> any: ...
|
2022-07-18 05:29:43 +00:00
|
|
|
def write(self, s: any) -> int: ...
|
2022-07-15 02:06:23 +00:00
|
|
|
def close(self): ...
|
2022-07-18 05:29:43 +00:00
|
|
|
def seek(self, offset: int, *fromwhere) -> int: ...
|
|
|
|
def tell(self) -> int: ...
|
2022-07-18 13:53:39 +08:00
|
|
|
def readline(self) -> str: ...
|
|
|
|
def readlines(self) -> List: ...
|
|
|
|
def writelines(self, lines: List): ...
|
2022-07-15 02:06:23 +00:00
|
|
|
|
2022-08-16 12:21:11 +08:00
|
|
|
|
2022-07-14 08:36:02 +00:00
|
|
|
class Utils:
|
2022-06-01 11:46:59 +08:00
|
|
|
# convert a int to bytes
|
|
|
|
def int_to_bytes(self, val: int) -> bytes: ...
|