Eric V. Smith <e...@trueblade.com> added the comment:

Not that it really matters to this issue, but here's how dataclasses and attrs 
deal with this:

dataclasses has the same issue, via make_dataclass().

attrs gives a syntax error with your field names, but interestingly this 
succeeds:

>>> Foo = attr,make_class('Foo', ['a', 'b', 'a'])
>>> Foo(1, 3)

I'll open a corresponding issue for dataclasses.
Foo(a=1, b=3)

----------
nosy: +eric.smith

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33880>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to