html tool

2012年11月7日星期三

Dive into Python 的我的翻译 IXXV------8.8


       [原文]P116
You're close to completely understanding Dialectizer. The only missing link is the nature of the text substitutions themselves. If you know any Perl, you know that when complex text substitutions are required, the only real solution is regular expressions. The classes later in dialect.py define a series of regular expressions that operate on the text between the HTML tags. But you just had a whole chapter on regular expressions. You don't really want to slog through regular expressions again, do you? God knows I don't. I think you've learned enough for one chapter.

[pope译]
你已经接近完全理解Dialectizer。唯一拉掉的连接是 文本性质的替换 。如果你懂得点儿Pert, 就知道复杂文本替换需求{required},真正解决方式正则表达.这章后面的dialect.py 定义了一段正则表达在html 标签间操作文本。但你之后将有完整的一章介绍正则表达。你不需要重复了解正则表达式,不是吗?神啊,我可不打算在这章给你讲。
[net 译 来源:http://woodpecker.org.cn/diveintopython/html_processing/dialect.html]
我们已经接近了对 Dialectizer 的全面理解。唯一缺少的一个环节是文本替换的特性。如果您知道点 Perl,您就会知道当需要复杂的文本替换时,唯一有效的解决方法就是正则表达式。在 dialect.py 文件后面的几个类中定义了一连串的正则表达式来操作 HTML 标记中的文本。我们已经学习过了正则表达式中的所有字符。我们不必重复学习正则表达式的艰难历程了,不是吗?上帝知道我反正不需要。我想现在这章您已经学得差不多了。
[popexizhi:
that operate on the text  between the HTML tage
[pope译] 在html 标签间操作文本
[net 译] 操作 HTML 标记中的文本
[popexizhi] between the html tage应该是修饰 text 的,这样翻译为在。。.中就感觉像是修改操作的,也不知道是不是这个原因,只是feel pope 的翻译不流畅:)

you just had a whole chapter on regular expressions.
[pope译] 但你之后将有完整的一章介绍正则表达
[net 译] 我们已经学习过了正则表达式中的所有字符
[popexizhi] just had :) 过去完成时,自己按照将来时翻译:).时态问题自己要多加注意了:)


========================================================

 (8/11/12)
[popexizhi]做两个总结上的要求:
1.lab:[dive into] 
每节结束总结python上学到的new 内容,为了表示自己是来dive into python的:)
2. lab:[ add 译]
总结翻译上的问题?再想想吧。
摘录此片的pope改进译,没有的找自己认为better的pope的net的都可以    



没有评论:

发表评论