tools: prefer filter to remove empty strings
Ref: https://github.com/nodejs/node/pull/23585#issuecomment-430585490 Python's `list.remove` will throw if the element is not found and also it removes only the first occurrence. This patch replaces the use of `list.remove` with a `filter` which solves both of the above mentioned problems. PR-URL: https://github.com/nodejs/node/pull/23727 Reviewed-By:Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Rod Vagg <rod@vagg.org> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Matheus Marchini <mat@mmarchini.me> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
parent
9c82a1e7
Please register or sign in to comment