pikapython/bsp/pico-dev/pikascript/PikaStdData.pyi

79 lines
2.2 KiB
Python
Raw Normal View History

2022-05-19 07:46:23 +08:00
from PikaObj import *
class List(TinyObj):
2022-06-24 00:19:04 +08:00
def __init__(self): ...
2022-05-19 07:46:23 +08:00
# add an arg after the end of list
2022-06-24 00:19:04 +08:00
def append(self, arg: any): ...
2022-05-19 07:46:23 +08:00
# get an arg by the index
2022-06-24 00:19:04 +08:00
def get(self, i: int) -> any: ...
2022-05-19 07:46:23 +08:00
# set an arg by the index
2022-06-24 00:19:04 +08:00
def set(self, i: int, arg: any): ...
2022-05-19 07:46:23 +08:00
# get the length of list
2022-06-24 00:19:04 +08:00
def len(self) -> int: ...
2022-05-19 07:46:23 +08:00
# support for loop
2022-06-24 00:19:04 +08:00
def __iter__(self) -> any: ...
2022-05-19 07:46:23 +08:00
# support for loop
2022-06-24 00:19:04 +08:00
def __next__(self) -> any: ...
2022-05-19 07:46:23 +08:00
# support list[] = val
def __setitem__(self, __key: any, __val: any): ...
2022-06-24 00:19:04 +08:00
# support val = list[]
def __getitem__(self, __key: any) -> any: ...
2022-06-24 00:19:04 +08:00
def __del__(self): ...
2022-05-19 07:46:23 +08:00
class Dict(TinyObj):
2022-06-24 00:19:04 +08:00
def __init__(self): ...
2022-05-19 07:46:23 +08:00
# get an arg by the key
2022-06-24 00:19:04 +08:00
def get(self, key: str) -> any: ...
2022-05-19 07:46:23 +08:00
# set an arg by the key
2022-06-24 00:19:04 +08:00
def set(self, key: str, arg: any): ...
2022-05-19 07:46:23 +08:00
# remove an arg by the key
2022-06-24 00:19:04 +08:00
def remove(self, key: str): ...
def __iter__(self) -> any: ...
def __next__(self) -> any: ...
2022-05-19 07:46:23 +08:00
# support dict[] = val
def __setitem__(self, __key: any, __val: any): ...
2022-06-24 00:19:04 +08:00
# support val = dict[]
def __getitem__(self, __key: any) -> any: ...
2022-06-24 00:19:04 +08:00
def __del__(self): ...
def keys(self) -> dict_keys: ...
2022-05-19 07:46:23 +08:00
2022-06-24 00:19:04 +08:00
class dict_keys(TinyObj):
def __iter__(self) -> any: ...
def __next__(self) -> any: ...
2022-05-19 07:46:23 +08:00
2022-06-24 00:19:04 +08:00
class String(TinyObj):
def __init__(self, s: str): ...
def set(self, s: str): ...
def get(self) -> str: ...
def __iter__(self) -> any: ...
def __next__(self) -> any: ...
2022-05-19 07:46:23 +08:00
# support string[] = val
def __setitem__(self, __key: any, __val: any): ...
2022-06-24 00:19:04 +08:00
# support val = string[]
def __getitem__(self, __key: any) -> any: ...
2022-06-24 00:19:04 +08:00
# support str()
def __str__(self) -> str: ...
def startwith(self, prefix: str) -> int: ...
def endwith(self, suffix: str) -> int: ...
def isdigit(self) -> int: ...
def islower(self) -> int: ...
def isalnum(self) -> int: ...
def isalpha(self) -> int: ...
def isspace(self) -> int: ...
def split(self, s: str) -> List: ...
2022-05-19 07:46:23 +08:00
class ByteArray(List):
# convert a string to ByteArray
2022-06-24 00:19:04 +08:00
def fromString(self, s: str): ...
class Utils(TinyObj):
# convert a int to bytes
def int_to_bytes(self, val: int) -> bytes: ...