Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
忽略文件时,“.pyc”和“.py[cod]”表示法之间有什么区别(如果有的话)。我注意到我的 git 忽略文件中都有。谢谢
您可以安全地.pyc从您的 中删除该条目.gitignore,因为.py[cod]它将覆盖它。方括号用于匹配任何一个字符,因此它匹配.pyc,.pyo和.pyd.
.pyc
.gitignore
.py[cod]
.pyo
.pyd
由于它们都是从.py源代码生成的,因此不应将它们存储在源代码管理中。
.py