python / python-docs-zh-cn

zh_CN translation of the Python documentation
https://docs.python.org/zh-cn/
431 stars 74 forks source link

3.1.2. 字符串 End of lines are automatically included in the string 里有翻译错误 #242

Closed Delhpi closed 1 year ago

Delhpi commented 2 years ago

String literals can span multiple lines. One way is using triple-quotes: """...""" or '''...'''. End of lines are automatically included in the string, but it’s possible to prevent this by adding a \ at the end of the line. 这句话的意思,默认情况下,会有1个 换行 字符包括到那个多行字符串里。但是中文文档里说 加在字符串 行尾, https://docs.python.org/zh-cn/3.9/tutorial/introduction.html

实际是加在 字符串 开头。 测试代码: a ="""\ Usage: thingy [OPTIONS] -h Display this usage message -H hostname Hostname to connect to """ print('a变量的长度是',len(a)) print('a变量第一个字符的ASCii是',ord(a[0])) b=""" Usage: thingy [OPTIONS] -h Display this usage message -H hostname Hostname to connect to """ print('b变量的长度是',len(b)) print('b变量第一个字符的ASCii是',ord(b[0]))

silkriver commented 2 years ago

fixed

Delhpi commented 2 years ago

fixed https://docs.python.org/zh-cn/3.9/tutorial/introduction.html#strings

网页里,我看 没有变啊。

silkriver commented 2 years ago

据说每3小时更新一次

Delhpi commented 2 years ago

据说每3小时更新一次

是美国人更新吗?好像已经过3小时了。

zhsj commented 2 years ago

翻译更新流程:https://github.com/python/python-docs-zh-cn/wiki/UpdateProcedure