Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3编辑代码的报警 #10

Open
Valuebai opened this issue Dec 12, 2019 · 1 comment
Open

python3编辑代码的报警 #10

Valuebai opened this issue Dec 12, 2019 · 1 comment

Comments

@Valuebai
Copy link

1、pirnt -> pirnt()
2、unicode的报警
py3 的字符串与 py2 的区别说穿了就是很简单的对三种数据类型的处理。py2 的方式意味着字符串跟字节流是相同的东西。而unicode字符串是某种独特的类型。bytes==strunicode!=strpy3 的方式意味着字符串跟unicode字符串是相同的东西,而字节流是某种独特的类型。unicode==strbytes!=strunicode是什么呢?是某种特定编码的字节流,是bytes的子集。这就意味着:所有的unicode都能放进bytes,但某些bytes无法放进unicode。C 程序员最难接受的就是无法将一串字节流放进字

Python3里str是unicode,所有需要和人交互的地方都应该用str

作者:pansz
链接:https://www.zhihu.com/question/60231684/answer/173871080
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

@toolgood
Copy link

可以尝试 我的项目 https://github.com/toolgood/ToolGood.Words
敏感词过滤支持C#,JAVA,GO,JS, Python3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants