最近跟一个外国小哥合作写了个 python 的爬虫,我们两个的意见在兼容性这一块出了分歧。
项目是用 python3.6 写的,但是我想兼容到 python3.0,理由是考虑比较多的项目可能是用旧的 python 版本写的,升级的话会有很多未知问题,并且 python 版本升级可能要考虑很多东西。
小哥的选择是兼容到 3.6 就 ok 了,因为程序是向前发展的,它总会追求新的语法和更方便易用。
他的原话:
"Yes I understand what you mean, but you cannot always please everybody, Python 2 users wont be able to use it for example only some people some of the time! Python is a language that always looks forward to new syntax and code design is essential to understanding the code and adding to it so for me the trade off is too big"
大家觉得应该兼容到 python3.0 还是到 python3.6 就好了?