Where does this come from: -*- coding: utf-8 -*-

前端 未结 4 1202
你的背包
你的背包 2020-11-30 17:29

Python recognizes the following as instruction which defines file\'s encoding:

# -*- coding: utf-8 -*-

I definitely saw this kind of instru

4条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 18:08

    In PyCharm, I'd leave it out. It turns off the UTF-8 indicator at the bottom with a warning that the encoding is hard-coded. Don't think you need the PyCharm comment mentioned above.

提交回复
热议问题