又被 Python 尾逗号创建 tuple 坑了一次
資深大佬 : guyskk0x0 2
车祸现场:
- https://github.com/anyant/rssant/commit/5b35f7a216597a29d79f58702cf405c520bead96
历史记录:
- https://origin.v2ex.com/t/565506
- https://blog.guyskk.com/notes/不要 Copy 代码-Python 尾逗号导致的 Bug
解决方案:pylint 或 pre-commit
- https://stackoverflow.com/questions/44700951/unintentional-trailing-comma-that-creates-a-tuple
- https://github.com/Trim21/find-trailing-comma
大佬有話說 (10)