Open anjakefala opened 1 year ago
!literal>feigenbaum 4.66920 !!python from aipl import defop from aipl.table import Table @defop('test', 1.5, 0.5) def testtest(aipl, t:Table) -> str: return dict(theanswer='42') !test !format {feigenbaum} # AIPL Error (line 11 !format): 'feigenbaum' !print
Will result in a table that looks like this:
This is because we went directly into call_cmd without going through any of the recursion steps in eval_op.
This means that we never convert the dict returned by !test into a LazyRow with columns. The structure of the table gets interpreted as a LazyRow that is holding a dict that also contains a __parent key, and !format won't know to search through it.
!test
__parent
!format
Originally posted by @anjakefala in https://github.com/saulpw/aipl/issues/23#issuecomment-1586627156
Will result in a table that looks like this:
This is because we went directly into call_cmd without going through any of the recursion steps in eval_op.
This means that we never convert the dict returned by
!test
into a LazyRow with columns. The structure of the table gets interpreted as a LazyRow that is holding a dict that also contains a__parent
key, and!format
won't know to search through it.Originally posted by @anjakefala in https://github.com/saulpw/aipl/issues/23#issuecomment-1586627156