Hi Jacob Thank you for your problem. I'll focus on your simple example (lightly edited for clarity)
> Let foo(a, b) be the syntax to call foo(a, b), and foo(a, b)% be the syntax > to jump to foo(a, b) > > c = 5 > > def foo(a): > return a + c > > def bar(a, c): > return foo(a) > > def bazz(a, c): > return foo(a)% > > call = bar(1, 3) # 6, being 1 + 5 > bazz(1, 3) # 4, being 1 + 3 This may allow you to solve your verb and morpheme problem. But I hope there's an easier way. One that can be done using Python as it is now. My understanding is that you want a stack. Similar to the Python's function call stack, but with something extra. So that functions execute in an richer context. Here's an idea. Start by giving us a toy example of a calculation you'd like to do. Then the problem is: how to do this in Python. By the way, are there any existing Python libraries for this sort of thing? I hope this helps. -- Jonathan _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/