Skip to content

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 3, 2020

If name is NULL, name is now set to co->co_name.
If qualname is NULL, qualname is now set to name.

qualname must not be NULL: it is used to build error messages.

Cleanup also the code: declare variables where they are initialized.
Rename "name" local variables to "varname" to avoid overriding "name"
parameter.

https://bugs.python.org/issue40679

If name is NULL, name is now set to co->co_name.
If qualname is NULL, qualname is now set to name.

qualname must not be NULL: it is used to build error messages.

Cleanup also the code: declare variables where they are initialized.
Rename "name" local variables to "varname" to avoid overriding "name"
parameter.
@vstinner
Copy link
Member Author

vstinner commented Jun 3, 2020

cc @cjerdonek

Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this issue, @vstinner.

@vstinner vstinner merged commit 232dda6 into python:master Jun 4, 2020
@vstinner vstinner deleted the eval_code_qualname branch June 4, 2020 13:19
@vstinner
Copy link
Member Author

vstinner commented Jun 4, 2020

Thanks for the reviews @cjerdonek, it was useful to write a second iteration of my PR ;-)

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

Successfully merging this pull request may close these issues.

4 participants