cheran-senthil / PyRival

⚡ Competitive Programming Library
https://pyrival.readthedocs.io/
Apache License 2.0
1.15k stars 311 forks source link

Add memoize decorators for bootstrap #62

Closed Mukundan314 closed 3 years ago

bjorn-martinsson commented 3 years ago

I do not think this is the correct direction to go. The point of the bootstrapper is to be a short piece of code that magically fixes recursion depth problems. If anything we should codegolf away the break in the original code to make it shorter (and maybe add some kind of comment of how to use bootstrapper). But I really don't think we should add stuff like bootstrap_memodict.

However I'm all up for adding something like bootstrap_ast.py. I'm still not sure what would be the best way to code that. But even for an ast version I don't think having a bootstrap_memodict would be useful.