Re:Show HN: ConvTools – generates Python code of conversions...
by birdculture on Sunday March 29, 2020 @08:04PM
(#22723929)
Looks neat! Would you ever consider adding a mode that skips code generation?
[ Parent
| on HN ]
Re:Show HN: ConvTools – generates Python code of conversions...
by westandskif on Monday March 30, 2020 @06:04AM
(#22726590)
It's not possible to skip the code generation part because a resulting converter is always compiled from the code written under the hood.
Could you please share what is your concern about this? I'd really like to better understand it!
JFYI: it's possible to skip running "gen_converter" method, it's possible to just use "execute" -- it runs "gen_converter" under the hood: c.group_by( c.item(0) ).aggregate({ c.item(0): c.reduce(c.ReduceFuncs.Sum, c.item(1)) }).execute([ (0, 1), (0, 2), (0, 3), (1, 10), (1, 12), ])
Out[5]: [{0: 6}, {1: 22}]
The downside is that you won't be reusing the converter.