Author jmg
Recipients jmg
Date 2020-11-19.20:36:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

There is not a way to document fields of a dataclass.

I propose that instead of making a language change, that an additional parameter to the field be added in similar vein to property.

This currently works:
class Foo:
 def getx(self):
  return 5
 x = property(getx, doc='document the x property')

So, I propose this:
class Bar:
 x : int = field(doc='document what x is')

This should be easy to support as I believe that the above would not require any changes to the core language.
Date User Action Args
2020-11-19 20:36:18jmgsetrecipients: + jmg
2020-11-19 20:36:18jmgsetmessageid: <>
2020-11-19 20:36:18jmglinkissue42414 messages
2020-11-19 20:36:18jmgcreate