ITPUB??ì3
ITPUB论坛 » 动态语言 » PythonTutorial中文版的一处翻译错误

新一届的微软MVP评选已经开始,欢迎各位推荐!

标题: PythonTutorial中文版的一处翻译错误
离线 hotiice
版主


精华贴数 10
个人空间 0
技术积分 16699 (62)
社区积分 1796 (648)
注册日期 2004-9-9
论坛徽章:21
现任管理团队成员会员2007贡献徽章铁扇公主生肖徽章2007版:牛2008北京奥运纪念徽章:帆船2008北京奥运纪念徽章:游泳
设计板块每日发贴之星设计板块每日发贴之星生肖徽章2007版:蛇2008年新春纪念徽章生肖徽章2007版:猴生肖徽章2007版:鼠

发表于 2006-12-19 21:40 
PythonTutorial中文版的一处翻译错误

timeit翻译错误
python2.4tut
里例子和原文确实是写传统方法快
但Py2_5_tut_cn里例子已经变了,原文也不是这么样写的,但翻译没有改过来。
10.10PerformanceMeasurement
SomePythonusersdevelopadeepinterestinknowingtherelativeperformancebetweendifferentapproachestothe
sameproblem.Pythonprovidesameasurementtoolthatanswersthosequestionsimmediately. Python
Forexample,itmaybetemptingtousethetuplepackingandunpackingfeatureinsteadofthetraditionalapproachto
swappingarguments.Thetimeitmodulequicklydemonstratesthatthetraditionalapproachisfaster: timeit
>>>fromtimeitimportTimer
>>>Timer(’t=a;a=b;b=t’,’a=1;b=2’).timeit()
0.60864915603680925
>>>Timer(’a,b=b,a’,’a=1;b=2’).timeit()
0.8625194857439773
Incontrastto timeit’sfinelevelofgranularity,the profile and pstats modulesprovidetoolsforidentifying
timecriticalsectionsinlargerblocksofcode.timeitprofilepstats

9.10PerformanceMeasurement
SomePythonusersdevelopadeepinterestinknowingtherelativeperformanceofdifferentapproachestothesame
problem.Pythonprovidesameasurementtoolthatanswersthosequestionsimmediately.Python
Forexample,itmaybetemptingtousethetuplepackingandunpackingfeatureinsteadofthetraditionalapproachto
swappingarguments.The
timeitmodulequicklydemonstratesamodestperformanceadvantage:timeit
>>>fromtimeitimportTimer
>>>Timer(’t=a;a=b;b=t’,’a=1;b=2’).timeit()
0.57535828626024577
>>>Timer(’a,b=b,a’,’a=1;b=2’).timeit()
0.54962537085770791
profile and pstats modulesprovidetoolsforidentifying
Incontrastto timeit’sfinelevelofgranularity,the
timecriticalsectionsinlargerblocksofcode.timeitprofilepstats




hotiice 上传了这个附件:
2006-12-19 21:40
py25.png (49.59 KB)
 

2006-12-19 21:40
py24.png (49.55 KB)
 

__________________
①②⑧

只看该作者    顶部
离线 tang2049
天王(收地租)


精华贴数 6
个人空间 0
技术积分 32664 (25)
社区积分 76335 (4)
注册日期 2005-9-25
论坛徽章:6
管理团队2007贡献徽章会员2007贡献徽章BLOG月度发帖之星月度论坛发贴之星ITPUB新首页上线纪念徽章 
      

发表于 2006-12-20 23:12 
这么仔细啊!PF一下……


只看该作者    顶部
离线 liujinyang
中级会员



精华贴数 0
个人空间 0
技术积分 406 (4785)
社区积分 2 (27114)
注册日期 2005-6-5
论坛徽章:0
      
      

发表于 2006-12-28 14:40 
顶一个,谢谢楼主


__________________
没有牺牲就没有获得,想要得到什么,就必须付出同等的代价。
只看该作者    顶部
离线 frogprince-erp
幸福像瓜一样


精华贴数 1
个人空间 0
技术积分 2987 (507)
社区积分 796 (1087)
注册日期 2005-5-10
论坛徽章:41
金色在线徽章生肖徽章:鸡生肖徽章:鸡生肖徽章:鸡生肖徽章:鸡 
      

发表于 2007-1-24 21:44 
看了


__________________
+++++++++++++++++++++++++++++++++
+WHAT I DO IS ME,FOR THAT I CAME
+msn:zhaochangsheng111@hotmail.com
只看该作者    顶部
离线 lixiubing
学习?玩?



精华贴数 0
个人空间 0
技术积分 1323 (1292)
社区积分 19 (7848)
注册日期 2006-12-27
论坛徽章:0
      
      

发表于 2007-1-25 23:40 
厉害啊


只看该作者    顶部
离线 HorseShell
资深会员



精华贴数 0
个人空间 0
技术积分 1040 (1748)
社区积分 26 (6713)
注册日期 2007-1-26
论坛徽章:2
ITPUB新首页上线纪念徽章     
      

发表于 2007-1-26 15:23 
Re: PythonTutorial中文版的一处翻译错误

Thanks
无比感激
Thanks
无比感激
Thanks
无比感激

QUOTE:
最初由 hotiice 发布
timeit翻译错误
python2.4tut
里例子和原文确实是写传统方法快
但Py2_5_tut_cn里例子已经变了,原文也不是这么样写的,但翻译没有改过来。
10.10PerformanceMeasurement
SomePythonusersdevelopadeepinterestinknowingtherelativeperformancebetweendifferentapproachestothe
sameproblem.Pythonprovidesameasurementtoolthatanswersthosequestionsimmediately. Python
Forexample,itmaybetemptingtousethetuplepackingandunpackingfeatureinsteadofthetraditionalapproachto
swappingarguments.Thetimeitmodulequicklydemonstratesthatthetraditionalapproachisfaster: timeit
>>>fromtimeitimportTimer
>>>Timer(’t=a;a=b;b=t’,’a=1;b=2’).timeit()
0.60864915603680925
>>>Timer(’a,b=b,a’,’a=1;b=2’).timeit()
0.8625194857439773
Incontrastto timeit’sfinelevelofgranularity,the profile and pstats modulesprovidetoolsforidentifying
timecriticalsectionsinlargerblocksofcode.timeitprofilepstats

9.10PerformanceMeasurement
SomePythonusersdevelopadeepinterestinknowingtherelativeperformanceofdifferentapproachestothesame
problem.Pythonprovidesameasurementtoolthatanswersthosequestionsimmediately.Python
Forexample,itmaybetemptingtousethetuplepackingandunpackingfeatureinsteadofthetraditionalapproachto
swappingarguments.The
timeitmodulequicklydemonstratesamodestperformanceadvantage:timeit
>>>fromtimeitimportTimer
>>>Timer(’t=a;a=b;b=t’,’a=1;b=2’).timeit()
0.57535828626024577
>>>Timer(’a,b=b,a’,’a=1;b=2’).timeit()
0.54962537085770791
profile and pstats modulesprovidetoolsforidentifying
Incontrastto timeit’sfinelevelofgranularity,the
timecriticalsectionsinlargerblocksofcode.timeitprofilepstats





只看该作者    顶部
 
    

相关内容


CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号 联系我们 法律顾问