Hades ships with three built-in functions that are always in scope and require no import. They are resolved before any user-defined function of the same name, so redefiningDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ToberlerOhn/hades/llms.txt
Use this file to discover all available pages before exploring further.
print, type, or len in your own code will shadow the built-in. Each function is described below with its full behaviour drawn directly from the interpreter.
print
Writes one or more values to standard output, concatenated with no separator. After printing, a newline is appended automatically (standard Python print behaviour).
Parameters
print is variadic — it accepts any number of arguments of any type. Passing zero arguments prints a blank line.
| Parameter | Type | Notes |
|---|---|---|
...args | any | Zero or more values; all are converted to strings before output |
Return value
nothing — print has no return value.
String conversion rules
The interpreter converts each argument using its internal_to_string helper before concatenating them. The conversion rules are:
bool
TRUE becomes the string 'TRUE'; FALSE becomes 'FALSE'. Python True/False are never exposed.nothing
A
nothing value (Python None) becomes the string 'nothing'.float
Trailing zeros are stripped —
1.5 prints as 1.5, not 1.500000. The integer part is preserved, so 2.0 prints as 2.int / str / list
All other values are converted with Python’s
str(), producing the natural representation.Examples
type
Returns the Hades type name of its argument as a str.
Parameters
| Parameter | Type | Notes |
|---|---|---|
value | any | Exactly one argument; passing zero or two or more arguments raises an error |
Return value
Astr containing the Hades type name. The mapping from runtime values to type names is:
| Value kind | Returned string |
|---|---|
| Boolean | 'bool' |
| Integer | 'int' |
| Float | 'float' |
| String | 'str' |
| Other | Python’s type.__name__ |
type distinguishes bool from int even though Python’s bool is a subclass of int. A Hades TRUE or FALSE value always returns 'bool', never 'int'.Examples
Error behaviour
Passing any number of arguments other than exactly one raises anInterpreterError at the call site:
len
Returns the number of elements in a list or the number of characters in a string.
Parameters
| Parameter | Type | Notes |
|---|---|---|
value | str or list | Exactly one argument; any other type raises an error |
Return value
Anint representing the length of the value.
| Input | Result |
|---|---|
str | Number of characters |
list | Number of elements |
Examples
Error behaviour
Passing a non-string, non-list value raises anInterpreterError:
Quick-Reference Summary
All three built-ins at a glance
All three built-ins at a glance
| Function | Signature | Returns | Description |
|---|---|---|---|
print | print(...args) | nothing | Concatenates all arguments and prints them with a trailing newline |
type | type(value) | str | Returns the Hades type name of the value |
len | len(value) | int | Returns the length of a string or list |