Not much to say, just trying out & experimenting

First function: Hello World

say_hello[source]

say_hello(to)

Say hello to someone (or the whole world).

say_hello("World")
'Hello World!'
assert say_hello("Test") == "Hello Test!"

First Class: Say

class Say[source]

Say(channel:Optional[Callable[[str], Any]]=None, **kwargs)

Say something to someone.

Say.__str__[source]

Say.__str__()

Return str(self).

Say.from_[source]

Say.from_(from_:str)

Edit who the message is from.

Say.to[source]

Say.to(to:str)

Edit who the message is to.

Say.__call__[source]

Say.__call__(message:Optional[str]=None)

Say the message on the configured channel.

Say().from_("Red Leader").to("Red Squadron")("Follow me!")
'Red Leader -> Red Squadron: Follow me!'
Say().from_("Red Leader")()
'Red Leader -> All: ...'
import io
sio = Say(channel=io.StringIO, from_="Odysseus", to="Pelops", msg="My name is nobody!")()
sio.getvalue()
'Odysseus -> Pelops: My name is nobody!'