electron/build
Matheus Rocha Vieira 1249c6ebf4 fix: Comparison using is when operands support __eq__ (#17864)
* Comparison using is when operands support __eq__

Comparison using 'is' when equivalence is not the same as identity

When you compare two values using the is or is not operator, it is the object identities of the two values that is tested rather than their equality. If the class of either of the values in the comparison redefines equality then the is operator may return False even though the objects compare as equal. Equality is defined by the __eq__ or, in Python2, __cmp__ method. To compare two objects for equality, use the == or != operator instead.

Recommendation
When you want to compare the value of two literals, use the comparison operator == or != in place of is or is not.

If the uniqueness property or performance are important then use an object that does not redefine equality.

* fix: Comparison using is when operands support __eq__

Comparison using 'is' when equivalence is not the same as identity

When you compare two values using the is or is not operator, it is the object identities of the two values that is tested rather than their equality. If the class of either of the values in the comparison redefines equality then the is operator may return False even though the objects compare as equal. Equality is defined by the __eq__ or, in Python2, __cmp__ method. To compare two objects for equality, use the == or != operator instead.

Recommendation
When you want to compare the value of two literals, use the comparison operator == or != in place of is or is not.

If the uniqueness property or performance are important then use an object that does not redefine equality.
2019-04-19 12:24:41 -07:00
..
args build: do not use custom libcxx on windows 2019-04-02 14:43:06 -07:00
config chore: add GN linting (#14678) 2018-10-03 18:03:26 -05:00
mac build: make make_locale_dirs idempotent (#15768) 2018-11-19 15:55:13 -08:00
asar.gni refactor: remove js2asar.py and port logic to JS in more readable / GN-style way (#16718) 2019-02-05 12:10:15 -08:00
electron.def fix: allow renaming electron.exe (#15173) 2018-10-15 17:26:34 -07:00
install-build-deps.sh ci: migrate libcc's Dockerfile to electron and update it (#14786) 2018-09-25 15:30:22 -04:00
js_wrap.gni fix: ensure the sandboxed preloads globals do not leak (#17712) 2019-04-16 10:57:02 -07:00
js_wrap.py fix: Comparison using is when operands support __eq__ (#17864) 2019-04-19 12:24:41 -07:00
node.gni refactor: remove js2asar.py and port logic to JS in more readable / GN-style way (#16718) 2019-02-05 12:10:15 -08:00
npm-run.py chore: suppress output of npm_action unless it fails (#16888) 2019-02-12 21:32:47 -08:00
npm.gni build: add a pre-flight check to all NPM steps in GN to ensure that we have the right NPM deps installed (#16974) 2019-02-14 14:28:41 -08:00
run-in-dir.py build: [gn] include node_modules in default_app asar 2018-07-25 11:45:22 -07:00
run-node.py refactor: remove js2asar.py and port logic to JS in more readable / GN-style way (#16718) 2019-02-05 12:10:15 -08:00
tsc.gni refactor: Split 'Event' docs/types into more specific Event types (#17038) 2019-02-19 09:24:19 +00:00
zip.py build: allow zip files to be created larger than 2GB 2019-04-02 14:43:05 -07:00