This topic created in 3791 days ago, the information mentioned may be changed or developed.
声明 python 源代码编码有很多种方法,明明#coding:utf8多简洁,你为什么非要用#-*- coding: utf-8 -*-,是因为它看起来更萌吗??!!!
你看这里,人家都说了,只要 the first or second line must match the regular expression coding[:=]\s*([-\w.]+),匹配上这玩意就行。
你喜欢萌,为什么不#-_- coding:utf8 -_-
#O(∩_∩)O coding:utf8 O(∩_∩)O 这个更萌!!
19 replies • 2016-01-08 10:34:02 +08:00
 |
|
1
master13 Jan 5, 2016
#(๑¯ω¯๑) coding:utf8 (๑¯ω¯๑)
|
 |
|
2
lao454490095 Jan 5, 2016
楼主好样的,以后试试 #O(∩_∩)O coding:utf8 O(∩_∩)O ,哈哈哈哈
|
 |
|
5
vanxining Jan 5, 2016 via Android
我也不知道啊,大家都这用的。原来还有其他用法……
|
 |
|
6
florije Jan 5, 2016
楼上是来源正解,不过 LZ 也说的对,毕竟一般的使用哪种写法就足够了。
|
 |
|
7
Tink Jan 5, 2016
我同三楼,编辑器自动的
|
 |
|
9
9hills Jan 5, 2016
你喜欢萌,为什么不#-_- coding:utf8 -_- 以后就用这个了
|
 |
|
10
Hello1995 Jan 5, 2016 via Android
这是 emacs 字符集相关的历史遗留问题…
|
 |
|
11
GHfan Jan 5, 2016
表示,在项目里一直推荐他们用 #coding:utf8 我要用 #-_- coding:utf8 -_- 报复他们!!
|
 |
|
12
tobyxdd Jan 5, 2016 via Android
#😃 coding: utf-8 😃
|
 |
|
14
bertonzh Jan 5, 2016
#+_+ coding:utf8 +_+
|
 |
|
15
clino Jan 5, 2016
#ლↀѡↀლcoding: utf-8ლↀѡↀლ
|
 |
|
16
zsj950618 Jan 6, 2016 via Android
pep0263 里说了啊,为了方便各种各样的编辑器识别啊。。。。
line in the file, such as:
# coding=<encoding name>
or (using formats recognized by popular editors)
#!/usr/bin/python # -*- coding: <encoding name> -*-
|