Site under construction! :3

Pigeon documentationξ―‚

Indexξ―‚

Coreξ―‚

Core functions and types can be overridden, by importing special objects from core.

For example, say you want to define a custom function that converts a string to lowercase, and then splits the string into an array of individual characters. This can be achieved two ways:

Method 1ξ―‚
string = "ABCD"

def custom_func(string: str) -> str:
    return string.lower().split()

custom_func(string)  # ["a", "b", "c", "d"]
custom_func("ABCD")  # ["a", "b", "c", "d"]
Method 2ξ―‚
string = "ABCD"

from core import __str__

def __str__.custom_func(self) -> str:
    return self.lower().split()

string.custom_func()  # ["a", "b", "c", "d"]
"ABCD".custom_func()  # ["a", "b", "c", "d"]