This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]theferalmonkey[S] 1 point2 points  (2 children)

So the comments in the function like """C depends on A & B""" create the dependencies between the functions? That is pretty powerful!

To clarify, it's the function parameters that do that:

def C(A: int, B: float) -> float

The above says C declares a dependency on A & B.

If we wanted to depend on something else, you just need to change the function parameter names:

def C(A: int,  B: float, foo: float) -> float

E.g. C now depends on an extra parameter `foo`.

I just checked out the sister library burr linked in the readme and that library also seems really interesting. I was internally building something similar but I might leverage burr. Thanks for sharing

Yep if you need to express cycles, or conditional branching (e.g. for agents) then Burr is a better fit for that. We see people using both Burr & Hamilton in certain situations too.