3 ms·
But that doesn't fix it? Sure, no more infinite recursion, but now print() calls len() which calls __builtins__.print(). So it's not doing the expected swapped
by brenns10 3y ago
But that doesn't fix it? Sure, no more infinite recursion, but now print() calls len() which calls __builtins__.print(). So it's not doing the expected swapped behavior. len() is swapped, but not print().
It seems obvious that there's a lack of understanding of the underlying concept here. That's the whole point. We know that LLMs can generate valid programs, but this is demonstrating that they cannot reason about code. There is no understanding of how Python code is evaluated, and how to avoid the infinite recursion. A human who understands Python could properly handle the situation, but the LLM can't, which is ok, it just demonstrates a flaw.