Coding tips
RecursionError: maximum recursion depth exceeded in Python: 8 Causes and Fixes, from Missing Base Cases to Properties and __repr__ (Tested Examples)
Python raises RecursionError: maximum recursion depth exceeded when a function calls itself, directly or indirectly, more than about 1,000 times. Here are 8 real causes, including hidden ones in properties, __getattr__ and __repr__, with tested output and a fix for each.