[issue41287] __doc__ attribute is not set in property-derived classes

Sergei Izmailov report at bugs.python.org
Tue Jul 14 03:19:25 EDT 2020


Sergei Izmailov <sergei.a.izmailov at gmail.com> added the comment:

class Property(property):
    'custom docstring'

print(Property(None, None, None, "hello").__doc__)

This snippet is expected to print "hello" as well (at least it's what comment in cpython implementation suggests) 

https://github.com/python/cpython/blob/master/Objects/descrobject.c#L1712-L1715

----------

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


More information about the Python-bugs-list mailing list