[New-bugs-announce] [issue37163] dataclasses.replace() fails with the field named "obj"

Serhiy Storchaka report at bugs.python.org
Wed Jun 5 07:13:04 EDT 2019


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

>>> from dataclasses import *
>>> @dataclass
... class D:
...     obj: object
... 
>>> replace(D(123), obj='abc')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: replace() got multiple values for argument 'obj'

----------
components: Library (Lib)
messages: 344704
nosy: eric.smith, serhiy.storchaka
priority: normal
severity: normal
status: open
title: dataclasses.replace() fails with the field named "obj"
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37163>
_______________________________________


More information about the New-bugs-announce mailing list