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 Noneinstead of== Noneeverywhere (which mostly justmeans test.py) except in one place in genv8constants.py. Switch to
is Nonein 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