summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a2ce100)
micropython.const now supports any constant type, not just int. This
updates the type checking to reflect this. This also updates the name of
the file so that type checkers can find it.
Fun = TypeVar("Fun", bound=Callable[..., Any])
Fun = TypeVar("Fun", bound=Callable[..., Any])
-def const(x: int) -> int:
+def const[T](x: T) -> T:
"Emulate making a constant"
def native(f: Fun) -> Fun:
"Emulate making a constant"
def native(f: Fun) -> Fun: