2012年7月3日星期二

Dive into Python 的我的翻译 XI


       3 P117
Finally, you have a class object (parserClass), and you want an instance of the class. Well, you already know how to do that: call the class like a function.
 The fact that the class is being stored in a local variable makes absolutely no difference; you just call the local variable like a function, and out pops an instance of the class. If parserClass is the class ChefDialectizer, parser will be an instance of the class ChefDialectizer.
[pope译] 终于{finally},你有一个class object (parserClass),并且你想要一个类的实例(instance).这样你知道了如何调用the class 就像调用函数一样。
实际上the class 和本地参数存储是没有不同的;你仅调用本地参数像调用函数一样,并且out pops{[?]这个out pops 在中文中如何翻译呢?}一个类的实例。如果parserClass 是类ChefDialectizer ,parser就是类ChefDialectizer的一个实例。

[net 译 来源:http://woodpecker.org.cn/diveintopython/html_processing/all_together.html]]
最后,我们拥有了一个类对象 (parserClass),接着我们想要生成这个类的一个实例。好,我们已经知道如何去做了:像函数一样调用类
这个类保存在一个局部变量中,但这个事实完全不会有什么影响;我们只是像函数一样调用这个局部变量,取出这个类的一个实例。如果 parserClass 是类 ChefDialectizerparser 将是类 ChefDialectizer 的一个实例。 ]

【popexizhi:
1."The fact that the class is being stored in a local variable makes absolutely no difference."
自己的翻译:实际上the class 和本地参数存储是没有不同的;
net做的是直接翻译第一句,但从句中no difference 意译翻译了:这个类保存在一个局部变量中,但这个事实完全不会有什么影响;
我这里列出来是想比较一下,这句如果想自己一样意译第一句,和意译第二句 有什么差别,自己感觉还是net的表述准确,因为原文中说的这个class,存成了a local variable 但是 和别的存储没什么不一样,后面说“you just call the local variable like a function” ,自己的翻译在这句上的the lpcal variable 交代不过去了:)

2." you just call the local variable like a function "
这句中自己的the 没有翻译:你仅调用本地参数像调用函数一样
net 翻译:我们只是像函数一样调用这个局部变量
加上1的问题,自己翻译还是对上下文把握不足。

3.“out pops”
这句如何翻译 net译:取出,go了一下 pops out 倒是蹦出的意思,但这里也不是很能解释通,还是很遗憾不知如何更好翻译。

】    

没有评论:

发表评论