你为什么非要 -*-

2016 年 1 月 5 日
 master13
4494 次点击
所在节点    Python
19 条回复
master13
2016 年 1 月 5 日
#(๑¯ω¯๑) coding:utf8 (๑¯ω¯๑)
lao454490095
2016 年 1 月 5 日
楼主好样的,以后试试 #O(∩_∩)O coding:utf8 O(∩_∩)O ,哈哈哈哈
chmlai
2016 年 1 月 5 日
编辑器自动补全的
lululau
2016 年 1 月 5 日
vanxining
2016 年 1 月 5 日
我也不知道啊,大家都这用的。原来还有其他用法……
florije
2016 年 1 月 5 日
楼上是来源正解,不过 LZ 也说的对,毕竟一般的使用哪种写法就足够了。
Tink
2016 年 1 月 5 日
我同三楼,编辑器自动的
florije
2016 年 1 月 5 日
@florije ……看一眼的功夫多了个 5 楼,只能说 4 楼正解了。
9hills
2016 年 1 月 5 日
你喜欢萌,为什么不#-_- coding:utf8 -_-
以后就用这个了
Hello1995
2016 年 1 月 5 日
这是 emacs 字符集相关的历史遗留问题…
GHfan
2016 年 1 月 5 日
表示,在项目里一直推荐他们用 #coding:utf8
我要用 #-_- coding:utf8 -_- 报复他们!!
tobyxdd
2016 年 1 月 5 日
#😃 coding: utf-8 😃
mengzhuo
2016 年 1 月 5 日
vim 自动补齐的……
bertonzh
2016 年 1 月 5 日
#+_+ coding:utf8 +_+
clino
2016 年 1 月 5 日
#ლↀѡↀლcoding: utf-8ლↀѡↀლ
zsj950618
2016 年 1 月 6 日
pep0263 里说了啊,为了方便各种各样的编辑器识别啊。。。。

line in the file, such as:

# coding=<encoding name>

or (using formats recognized by popular editors)

#!/usr/bin/python
# -*- coding: <encoding name> -*-
songkaiape
2016 年 1 月 6 日
@clino 看到这里忍不住笑了
chenyuxiaodhr
2016 年 1 月 6 日
#/ w\ coding:utf8 / w\
rxkh
2016 年 1 月 8 日

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/248543

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX