ipython / ipython/ipython

Crash when RecursionError should be thrown

Open
#12,387 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
16.8k
Forks
4.5k
Avg merge
1d 2h
Merged PRs (30d)
6

Description

```python
class C():
@property
def x(self):
return self.x
C().x
```
See [here](https://stackoverflow.com/q/62356253/10133797); same if running as a file (main) or from within IPython 7.13.0, in Spyder 4.1.3. Some users reproduced this from within terminal (not myself), as attested in comments in linked SO.


**Update**: these were also reproduced by another user from terminal (and myself with Spyder):

```python
def f(*args):
f(*args)
f() # crash
```

```python
def f():
f()
f() # RecursionError (no crash)

def f(x):
f(x)
f(5) # RecursionError (no crash)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.