Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name "__doc__" should be set to docstring in class body #1635

Closed
jdemeyer opened this issue Mar 17, 2017 · 0 comments
Closed

Name "__doc__" should be set to docstring in class body #1635

jdemeyer opened this issue Mar 17, 2017 · 0 comments

Comments

@jdemeyer
Copy link
Contributor

jdemeyer commented Mar 17, 2017

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.

@jdemeyer jdemeyer changed the title Docstring does not set __doc__ entry Name "__doc__" should be set to docstring Mar 17, 2017
@scoder scoder added this to the 3.0 milestone Aug 20, 2018
@scoder scoder changed the title Name "__doc__" should be set to docstring Name "__doc__" should be set to docstring in class body Sep 3, 2018
@scoder scoder closed this as completed in bb32de0 Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants