[原文]P116
Now back to our regularly scheduled program: Dialectizer. When you left, you were in the process of defining specific handler methods for
andtags. There's only one thing left to do, and that is to process text blocks with the pre−defined substitutions. For that, you need to override the handle_data method.
[pope译]
现在回来说我们之前安排的程序:Dialecitize。当你离开时,你已经对
和标记的特殊处理方法了解了。这就剩下一个了,处理pre 定义的文本块。做这个,你需要先了解{override}handle_data 方法.
[net 译 来源:http://woodpecker.org.cn/diveintopython/html_processing/dialect.html ]
现在回到我们已经计划好的程序:Dialectizer。当我们跑题时,我们定义了特别的处理方法来处理 和
when you left,you were in the process of defining specific handler methods for
[pope译]当你离开时,你已经对
和标记的特殊处理方法了解了。
[net 译]当我们跑题时,我们定义了特别的处理方法来处理 和
标记。 [popexizhi]这里的when you left ,说的上文吧,net翻译为跑题,:) ,还好吧。这里翻译you 为我们倒是体现了翻译的好处, you were in the process 是这句的主干,是你之前在这个过程中,定义
特殊方法的过程中。
process text blocks with the pre-defined substitutions
[popexizhi]pre-defined 合起来翻译啊,是预定义:) 分开翻译是pre 定义,好像没什么解释性的区别:)
override the ...
[popexizhi]覆盖之前定义的,也应该是说的重载吧:)
]
[原文]P116
def handle_data(self, text): 1
self.pieces.append(self.verbatim and text or self.process(text)) 2
1.
[原文]P116
handle_data is called with only one argument, the text to process.
[pope译] handle_data 调用时只有一个参数 text到这个过程 (to process)【popexizhi:嘻嘻这个to process在中文翻译时如何处理呢?】
[net 译 来源:http://woodpecker.org.cn/diveintopython/html_processing/dialect.html ]
handle_data 在调用时只使用一个参数:要处理的文本
[popexizhi:
the text to the process
[popexizhi]to the process 翻译为定语要处理的:)
]
没有评论:
发表评论