Closed
Description
Feature or enhancement
Proposal:
I want this to work:
>>> n=ast.Name(id="x")
>>> copy.replace(n, id="y")
Traceback (most recent call last):
File "<python-input-4>", line 1, in <module>
copy.replace(n, id="y")
~~~~~~~~~~~~^^^^^^^^^^^
File "/Users/jelle/py/cpython/Lib/copy.py", line 293, in replace
raise TypeError(f"replace() does not support {cls.__name__} objects")
TypeError: replace() does not support Name objects
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response