Skip to content

Set docstring of function as None if not declared #1580

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

Merged
merged 1 commit into from
Nov 2, 2019

Conversation

seeeturtle
Copy link
Contributor

In cpython, if there is no docstring declared in function definition,
the __doc__ attribute of the function is None.
So this implements the behavior.

Fix #1523

In cpython, if there is no docstring declared in function definition,
the `__doc__` attribute of the function is None.
So this implements the behavior.

Fix RustPython#1523
@palaviv
Copy link
Contributor

palaviv commented Nov 2, 2019

Great work @seeeturtle. This make the change in #1550 redundant so I would suggest removing it in a different PR.

@seeeturtle
Copy link
Contributor Author

@palaviv what do you mean to remove in different PR?

@coolreader18
Copy link
Member

I think he's made the change in #1582

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Objects inherit docstring from object if not overwritten
3 participants