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

Fix crash when running with optimization #2160

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

QuLogic
Copy link

@QuLogic QuLogic commented Jun 28, 2024

In that case, __doc__ is None.

In that case, `__doc__` is None.
@takluyver
Copy link
Member

I think this is actually a good illustration of why we shouldn't care about the PYTHONOPTIMIZE or -O options. This line has been there with minor tweaks for over a decade (from 70be6cc), and would break as soon as you import nbconvert with optimize level 2. I can't find any issue filed about it before this one, and it looks like you've only noticed it because of a test failure on matplotlib, from an issue that went 5 years between comments.

The 'optimize' options make hardly any performance difference to normal code, anyway. If someone has a use case where they're actually useful, then they're easy enough to support, but I don't think everyone should spend time and thought on them just because they exist.

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

Successfully merging this pull request may close these issues.

3 participants