bpo-29849: fix memory leak in import_from by zhangyangyu · Pull Request #712 · python/cpython
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor doc removal, otherwise LGTM.
| "cannot import name %R from %R (unknown location)", | ||
| name, pkgname_or_unknown | ||
| ); | ||
| /* doesn't check NULL for errmsg, PyErr_SetImportError will catch */ |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the comment is necessary long-term.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is to make others know the error check is left out deliberately. It is not an oversight.
Do you think it's a must to remove it?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to keep it then please change it to "/* NULL check for errmsg done by PyErr_SetImportError. */".