An important part of coding is documentation and code formatting, or “programming etiquette” as it may be called. 编码的一个重要部分是注释和代码格式化,或者称为“编程礼仪”。 The ability of an individual to take written code, decipher its mean...
以下是一个简单的示例,演示如何使用Python的`googletrans`库将中文注释翻译成英文: ```python from googletrans import Translator 定义中文注释 chinese_comment = "这是一段中文注释" 创建Translator对象 translator = Translator() 将中文注释翻译成英文 english_comment = (chinese_comment, dest='en').text 输出英...
使用tokenize 来解析python文件获取注释,使用translate来翻译 pip install tokenize pip install translate 2、代码示例 import tokenize from translate import Translator def extract_comments(filename): with open(filename, 'rb') as file: tokens = tokenize.tokenize(file.readline) comments = [] for tok in ...
翻译结果1复制译文编辑译文朗读译文返回顶部 Tomorrow at home, flight chess code to add comments 翻译结果2复制译文编辑译文朗读译文返回顶部 翻译结果3复制译文编辑译文朗读译文返回顶部 Tomorrow at home, chess code plus flight notes 翻译结果4复制译文编辑译文朗读译文返回顶部 ...
更离谱的是,很多外国人以英语作为第一母语,英文代码后面竟然还要用英语再注释一遍!图片来自网络,用...
请在下面的文本框内输入文字,然后点击开始翻译按钮进行翻译,如果您看不到结果,请重新翻译! 翻译结果1翻译结果2翻译结果3翻译结果4翻译结果5 翻译结果1复制译文编辑译文朗读译文返回顶部 诊断的代码:X;用户网管(webmaster@icbc.com.cn)不升 翻译结果2复制译文编辑译文朗读译文返回顶部 ...
GinRyan changed the title Update zoom.md 为zoom动画讲解部分的代码中的英文注释翻译成中文。 Oct 10, 2014 Owner kesenhoo commented Oct 11, 2014 感谢参与,关于代码注释的英文部分,之前是没有花进行翻译的。不过你已经翻译了,也是好事。欢迎继续关注其他章节,帮忙继续完善!谢谢! kesenhoo added a commit ...
英文资源文件修改: 四,调用代码: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using Syste...
所以在设计编程语言的时候,当然会选择英文作为基准,所以欧美国家的技术人员,会更加适合学习编程,起码能够排除语言的障碍,在这方面国内的人员相对比较吃亏,所以才有了要学习编程语言首先得有一一定的英文基础,单单因为语言方面就阻挡了很多人去学习编程,无形之中增加了编程语言学习的门槛,因为翻译不准等方面就会延缓学习...