搜索没有按预期执行
运行 `search c` 并没有返回人们所期望的结果。人们会期望看到一张庞大的以 c 编写的恶意软件表,但该表却为空。<img width="464" alt="Screen Shot 2019-12-09 at 10 30 45 PM" src="https://user-images.githubusercontent.com/37343577/70496242-8d0c3d80-1ad4-11ea-9568-2a4a871116bc.png"> 这是由于 manysearches.py 中的一行代码。由于它使用了 `in`,因此进行子字符串搜索。从技术上讲,`c` 位于 `mac` 中,因此平台与 `mac` 绑定。`c` 与 `language` 绑定,但由于 `cpp` 也包含 `c`,因此 `cpp` 覆盖了 `c` 的 `language`,因为它在列表中位于后面。<img width="1505" alt="Screen Shot 2019-12-09 at 10 36 32 PM" src="https://user-images.githubusercontent.com/37343577/70496257-98f7ff80-1ad4-11ea-9ce1-2cb5bb5593a4.png"> 如果 `if arg in values:` 为 `if arg == values`,则会提供正确的搜索结果。<img width="719" alt="Screen Shot 2019-12-09 at 10 36 57 PM" src="https://user-images.githubusercontent.com/37343577/70496277-a8774880-1ad4-11ea-8a8f-c8d94c4b3e5e.png">
内容来源: ytisf/theZoo