-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
tools: use is None
consistently in Python
#36606
Conversation
I added two more minor changes: An explicit file close at the end of the script, and correcting the usage message. |
I'm trying to test to make sure the script still works. Does it require a debug build? Do we not use this anymore and the right thing to do is delete it? |
It's used in Lines 1160 to 1178 in 5bd1eec
dtrace to be enabled via configure . This looks to be the default for macOS and smartOS (according to configure ): Line 514 in 083abe2
|
And because line 1163 excludes Mac and Linux unconditionally, this is probably only used on SmartOS? Line 1163 in 5bd1eec
|
We use `is None` instead of `== None` everywhere (which mostly just means test.py) except in one place in genv8constants.py. Switch to `is None` in genv8constants.py. This is slightly more efficient, although I can't imagine that makes a measurable difference here. PR-URL: nodejs#36606 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#36606 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#36606 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Landed in 73a21e4...e068eec |
We use `is None` instead of `== None` everywhere (which mostly just means test.py) except in one place in genv8constants.py. Switch to `is None` in genv8constants.py. This is slightly more efficient, although I can't imagine that makes a measurable difference here. PR-URL: #36606 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #36606 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #36606 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
We use `is None` instead of `== None` everywhere (which mostly just means test.py) except in one place in genv8constants.py. Switch to `is None` in genv8constants.py. This is slightly more efficient, although I can't imagine that makes a measurable difference here. PR-URL: #36606 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #36606 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #36606 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
We use
is None
instead of== None
everywhere (which mostly justmeans test.py) except in one place in genv8constants.py. Switch to
is None
in genv8constants.py. This is slightly more efficient, although Ican't imagine that makes a measurable difference here.
Related Issues
Fixes: https://github.com/nodejs/node/issues/<issue_number>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes