【python】声明编码的格式

来自:http://www.xuebuyuan.com/975181.html

 

编码声明必须在第一行或者第二行,且要符合正则表达式 

 "coding[:=]\s*([-\w.]+)"

 

下面这些写法都是对的

#coding=utf-8 

#coding:utf-8

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

 

posted @ 2017-08-02 12:03  匡子语  阅读(985)  评论(0编辑  收藏  举报