New GitHub issue #95248 from BnGx:<br>
<hr>
<pre>
# Bug report
The _dict.setdefault()_ function makes dictionary arguments persistent across all instances of the class.
Arguments of different instances have the same ID and therefore also the same values.
# Environment
- CPython versions tested on: 3.10.4
- Operating system and architecture: Linux - amd64
# PoC
```python
class Test:
def __init__(self, a, b={}):
b.setdefault('key', a)
print('id:', id(b), '-', 'value:', b)
Test(1) # Print 1
Test(2) # Print 1
```
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/95248">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>