pikapython/package/PikaStdLib/PikaStdData.pyi

99 lines
1.7 KiB
Python
Raw Normal View History

2022-04-26 21:34:43 +08:00
#api
2021-12-13 21:32:45 +08:00
from PikaObj import *
2021-12-13 22:14:59 +08:00
2021-12-13 21:32:45 +08:00
class List(TinyObj):
2022-04-07 22:59:57 +08:00
def __init__(self):
2021-12-13 21:32:45 +08:00
pass
2021-12-13 22:14:59 +08:00
# add an arg after the end of list
2022-04-07 22:59:57 +08:00
def append(self, arg: any):
2021-12-13 21:32:45 +08:00
pass
2021-12-13 22:14:59 +08:00
# get an arg by the index
2022-04-07 22:59:57 +08:00
def get(self, i: int) -> any:
2021-12-13 21:32:45 +08:00
pass
2021-12-13 22:14:59 +08:00
# set an arg by the index
2022-04-07 22:59:57 +08:00
def set(self, i: int, arg: any):
2021-12-13 21:32:45 +08:00
pass
2021-12-13 22:14:59 +08:00
# get the length of list
2022-04-07 22:59:57 +08:00
def len(self) -> int:
2021-12-13 22:14:59 +08:00
pass
2022-01-13 21:57:32 +08:00
# support for loop
2022-04-07 22:59:57 +08:00
def __iter__(self) -> any:
2021-12-28 01:21:47 +08:00
pass
2022-01-13 21:57:32 +08:00
# support for loop
2022-04-07 22:59:57 +08:00
def __next__(self) -> any:
2021-12-28 01:21:47 +08:00
pass
2022-01-13 21:57:32 +08:00
# support list[] = val
2022-04-07 22:59:57 +08:00
def __set__(self, __key: any, __val: any):
2022-01-13 21:57:32 +08:00
pass
# support val = list[]
2022-04-07 22:59:57 +08:00
def __get__(self, __key: any) -> any:
2022-01-13 21:57:32 +08:00
pass
2021-12-13 22:14:59 +08:00
class Dict(TinyObj):
2022-04-07 22:59:57 +08:00
def __init__(self):
2021-12-13 22:14:59 +08:00
pass
# get an arg by the key
2022-04-07 22:59:57 +08:00
def get(self, key: str) -> any:
2021-12-13 22:14:59 +08:00
pass
# set an arg by the key
2022-04-07 22:59:57 +08:00
def set(self, key: str, arg: any):
2021-12-13 22:14:59 +08:00
pass
# remove an arg by the key
2022-04-07 22:59:57 +08:00
def remove(self, key: str):
2021-12-13 22:14:59 +08:00
pass
2021-12-28 01:21:47 +08:00
2022-04-07 22:59:57 +08:00
def __iter__(self) -> any:
2021-12-28 01:21:47 +08:00
pass
2022-04-07 22:59:57 +08:00
def __next__(self) -> any:
2021-12-28 01:21:47 +08:00
pass
2022-01-13 16:34:46 +08:00
2022-01-13 21:57:32 +08:00
# support dict[] = val
2022-04-07 22:59:57 +08:00
def __set__(self, __key: any, __val: any):
2022-01-13 21:57:32 +08:00
pass
# support val = dict[]
2022-04-07 22:59:57 +08:00
def __get__(self, __key: any) -> any:
2022-01-13 21:57:32 +08:00
pass
2022-01-13 16:34:46 +08:00
class String(TinyObj):
2022-04-07 22:59:57 +08:00
def __init__(self, s:str):
2022-04-04 16:36:10 +08:00
pass
2022-04-07 22:59:57 +08:00
def set(self, s:str):
2022-01-13 17:07:07 +08:00
pass
2022-04-07 22:59:57 +08:00
def get(self)->str:
2022-01-13 17:07:07 +08:00
pass
2022-04-07 22:59:57 +08:00
def __iter__(self) -> any:
2022-01-13 16:34:46 +08:00
pass
2022-04-07 22:59:57 +08:00
def __next__(self) -> any:
2022-01-13 21:57:32 +08:00
pass
# support string[] = val
2022-04-07 22:59:57 +08:00
def __set__(self, __key: any, __val: any):
2022-01-13 21:57:32 +08:00
pass
# support val = string[]
2022-04-07 22:59:57 +08:00
def __get__(self, __key: any) -> any:
2022-03-25 21:39:52 +08:00
pass
class ByteArray(List):
# convert a string to ByteArray
2022-04-07 22:59:57 +08:00
def fromString(self, s:str):
2022-03-25 21:39:52 +08:00
pass