Skip to main content

internal.core

Standard library Module View source
alias int
int = Int[64]
Alias of Int[64]
alias i1
i1 = Int[1]
Alias of Int[1]
alias i8
i8 = Int[8]
Alias of Int[8]
alias i16
i16 = Int[16]
Alias of Int[16]
alias i32
i32 = Int[32]
Alias of Int[32]
alias i64
i64 = Int[64]
Alias of Int[64]
alias i128
i128 = Int[128]
Alias of Int[128]
alias u1
u1 = UInt[1]
Alias of UInt[1]
alias u8
u8 = UInt[8]
Alias of UInt[8]
alias u16
u16 = UInt[16]
Alias of UInt[16]
alias u32
u32 = UInt[32]
Alias of UInt[32]
alias u64
u64 = UInt[64]
Alias of UInt[64]
alias u128
u128 = UInt[128]
Alias of UInt[128]
alias byte
byte = UInt[8]
Alias of UInt[8]
alias cobj
cobj = Ptr[u8]
Alias of Ptr[u8]
class Tuple
@tuple
class Tuple
Constructors 1
__new__
@llvm
__new__() -> Tuple
ret {} {}
Special methods 23
__add__
__add__(self: Self, obj, /)
__mul__
__mul__[n: Literal[int]](self: Self, /)
__contains__
__contains__(self: Self, obj, /) -> bool
__getitem__
__getitem__(self: Self, idx: int, /)
__iter__
__iter__(self: Self, /)
__hash__
__hash__(self: Self, /) -> int
__repr__
__repr__(self: Self, /) -> str
__len__
__len__(self: Self, /) -> int
__eq__
__eq__(self: Self, obj: Self, /) -> bool
__ne__
__ne__(self: Self, obj: Self, /) -> bool
__gt__
__gt__(self: Self, obj: Self, /) -> bool
__ge__
__ge__(self: Self, obj: Self, /) -> bool
__lt__
__lt__(self: Self, obj: Self, /) -> bool
__le__
__le__(self: Self, obj: Self, /) -> bool
__pickle__
__pickle__(self: Self, dest: Ptr[u8])
__unpickle__
__unpickle__(src: Ptr[u8]) -> Self
__to_py__
__to_py__(self: Self) -> Ptr[u8]
__from_py__
__from_py__(src: Ptr[u8]) -> Self
__to_gpu__
__to_gpu__(self: Self, cache) -> Self
__from_gpu__
__from_gpu__(self: Self, other: Self)
__from_gpu_new__
__from_gpu_new__(other: Self) -> Self
__tuplesize__
__tuplesize__(self: Self) -> int
__bool__
__bool__(self: Self) -> bool
alias tuple
tuple = Tuple
Alias of Tuple
function pure
@__attribute__
pure()
function derives
@__attribute__
derives()
alias function
function = Function
Alias of Function
class ellipsis
@tuple
class ellipsis
Constructors 1
__new__
@pure @derives @llvm
__new__() -> ellipsis
ret {} {}
variable Ellipsis
Ellipsis = ellipsis()
class Import
@tuple
class Import[file, name]
Fields 3
loaded bool
file Literal[str]
name Literal[str]
Constructors 1
__new__
@pure @derives @llvm
__new__[file: Literal[str], name: Literal[str]](loaded: bool) -> Import[(file, name)]
%0 = insertvalue { {=bool} } undef, {=bool} %loaded, 0
ret { {=bool} } %0
function compile_error
@__generated__
compile_error[msg: Literal[str]]()
function isinstance
@__generated__
isinstance(obj, what)
function overload
@__attribute__
overload()
function hasattr
@__generated__
hasattr[attr: Literal[str]](obj, *args, **kwargs)
function hasattr_dynamic
@__generated__
hasattr_dynamic[attr: Literal[str]](obj, *args, **kwargs)
function setattr
@__generated__
setattr[attr: Literal[str]](obj, what)
function super
@__generated__
super()
function superf
@__generated__
superf(*args)

Special handling

class FixedDict
@tuple
class FixedDict[_KeysId, T]
Fields 1
T type
Constructors 1
__new__
@pure @derives @llvm
__new__[_KeysId: Literal[int] = 0, T: type](values: T = ()) -> FixedDict[(_KeysId, T)]
%result = insertvalue { {=T} } undef, {=T} %values, 0
ret { {=T} } %result
class Partial
@tuple
class Partial[M, T, K, F]
Fields 6
args T
kwargs K
M Literal[str]
T type
K type
F type
Constructors 1
__new__
@pure @derives @__internal__
__new__[M: Literal[str], F: type, T: type, K: type](args: T, kwargs: K) -> Partial[(M, T, K, F)]
class Callable
@tuple
class Callable[T, TR]
Fields 4
fn Function[([Ptr[u8], T], TR)]
data Ptr[u8]
T type
TR type
class Coroutine
@tuple
class Coroutine[T]
Fields 1
T type
Special methods 2
__raw__
@pure @derives @llvm
__raw__(self: Self) -> Ptr[u8]
ret ptr %self
__await__
@pure @derives @llvm
__await__(self: Self) -> Generator[T]
ret ptr %self
class AsyncGenerator
@tuple
class AsyncGenerator[T]
Fields 1
T type
Special methods 1
__raw__
@pure @derives @llvm
__raw__(self: Self) -> Ptr[u8]
ret ptr %self