Andrei Kulakov <andrei....@gmail.com> added the comment:

I was thinking about adding this to named tuple as well, but it's less useful 
than with dataclasses because named tuples are simpler and smaller. However if 
this feature is added to dataclasses and is widely used, it would make a lot of 
sense to expand it to namedtuples especially if people request that.

I don't think it makes sense for attributes because many attributes are 
immutable so you can't add a doc attr to them. Additionally, most attrs can be 
documented via methods that set or update them.

I agree it's a good idea to bring this to Ideas, I'll think about this for a 
few days and then do that. Thanks!

----------

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

Reply via email to