"""Provides Python objects for builtin language keywords."""fromtypingimportAny,Protocolclass_Comptime:"""Dummy class to support `@comptime` annotations and `comptime(...)` expressions"""def__call__(self,*args:Any)->Any:returntuple(args)def__rmatmul__(self,other:Any)->Any:# This method is to make the Python interpreter happy with @comptime at runtimereturnother#: Function to tag compile-time evaluated Python expressions in a Guppy context.#:#: This function acts like the identity when execute in a Python context.comptime=_Comptime()#: Alias for `comptime` expressionspy=comptimeclass_Owned:"""Dummy class to support `@owned` annotations."""def__rmatmul__(self,other:Any)->Any:returnotherowned=_Owned()
[docs]classCopy(Protocol):"""Bound to mark generic type parameters as being implicitly copyable."""
[docs]classDrop(Protocol):"""Bound to mark generic type parameters as being implicitly droppable."""