写程序的时候发现这么个问题,在项目里新建一个py文件时,第一行会出现下面这行语句
# This Python file uses the following encoding: utf-8或者# encoding: utf-8或者#coding=utf-8即可,这里“:”跟“=”效果一样,没有什么区别。
__author__ = "XXX",
如果冒号里出现中文,它会导致程序运行报错,我感觉最快的方法就是把它删了。。。
当然,也可以加一行# This Python file uses the following encoding: utf-8或者# encoding: utf-8或者#coding=utf-8即可,这里“:”跟“=”效果一样,没有什么区别。