got distracted and made a repl framework.......

This commit is contained in:
Emile Clark-Boman 2025-06-22 00:26:54 +10:00
parent 0a2d9a5694
commit c18aa29c58
5 changed files with 227 additions and 17 deletions

8
bcrypter/lib/other.py Normal file
View file

@ -0,0 +1,8 @@
'''
Implements a safe way of indexing a list.
'''
def tryget(L: list[Any], i: int, default: Any | None = None) -> Any:
try:
return L[i]
except IndexError:
return default