This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author torsten
Recipients torsten
Date 2015-11-27.23:43:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448667832.51.0.334598445629.issue25757@psf.upfronthosting.co.za>
In-reply-to
Content
I actually found this in Python2, but it is still unchanged in Python 3.6 dev. Namely, creating an instance of a class derived from property will drop the docstring passed explicitly to the constructor: 

torsten@defiant:~$ python3.6
Python 3.6.0a0 (default:9fcfdb53e8af, Nov 27 2015, 23:11:09) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> property(doc="Hello world").__doc__
'Hello world'
>>> class SubProp(property): pass
... 
>>> SubProp(doc="Hello world").__doc__
>>>

This war surprising to me. I actually used a subclass of property to describe fields of configuration classes with extensive documentation, which disappeared during runtime.

In Python2 I work around this by assigning to __doc__ as the last thing in the constructor of my SubProp class.
History
Date User Action Args
2015-11-27 23:43:52torstensetrecipients: + torsten
2015-11-27 23:43:52torstensetmessageid: <1448667832.51.0.334598445629.issue25757@psf.upfronthosting.co.za>
2015-11-27 23:43:52torstenlinkissue25757 messages
2015-11-27 23:43:52torstencreate