Accessing the __doc__ attribute within a class in Cython does not work correctly:
class C(object):
"Class docstring"
docattr = __doc__
In Python, C.docattr will be 'Class docstring'. In Cython, this does not work: it takes the __doc__ from the module instead of the class.
This issue occurs both for Python classes as well as extension types.