diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-04-24 09:42:33 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-04-28 22:42:39 +0300 |
commit | 6944d06116bf3ed691faf991dbfa0478c8c2d345 (patch) | |
tree | 819625a2a51e380cf3bfd8a0074d17789a17834d /docs/markdown/Use-of-Python.md | |
parent | 9635d0bd69e14e1647aae61b254e3848150dfbae (diff) | |
download | meson-6944d06116bf3ed691faf991dbfa0478c8c2d345.zip meson-6944d06116bf3ed691faf991dbfa0478c8c2d345.tar.gz meson-6944d06116bf3ed691faf991dbfa0478c8c2d345.tar.bz2 |
Don't use dict.keys() to check membership
It's much faster to do 'if a in dict' instead of 'if a in dict.keys()',
since the latter constructs an iterator and walks that iterator and then
tests equality at each step, and the former does a single hash lookup.
Diffstat (limited to 'docs/markdown/Use-of-Python.md')
0 files changed, 0 insertions, 0 deletions