python禅语,Python是一种禅语吗?

Greetings,

I have a rough classification of languages into 2 classes: Zen

languages and tool languages. A tool language is a language that is,

well, a *tool* for programming a computer. C is the prototypical tool

language. Most languages in the Algol family are tool languages. Visual

Basic and Java are also tool languages. On the other hand, a Zen

language is a language which is purported to transform your way of

thinking about programming. Lisp, Scheme, Forth, Smalltalk and (maybe)

C++ are Zen languages. Disciples acknowledge that it is difficult to

pick up these languages but claim that, if you persevere, you sooner or

later reach a state of computational satori in which it all makes

sense. Interestingly enough, these languages often have books which

approach scriptural status e.g. SICP for Scheme.

So (assuming my classification makes sense) which is Python? The

emphasis on simplicity and the beginner-friendly nature of it seems to

put it in the tool category. On the other hand, the emphasis on the ONE

TRUE WAY to accomplish most tasks and the tendency for participants in

this newsgroup to criticize one another''s code as being "unpythonic"

seems to move it towards the Zen category. Of course, even tool

languages have their idioms which the novice needs to pick up, so maybe

this isn''t decisive, but I detect an element of zeal in this newsgroup

that I don''t detect in (say) Excel VBA programming newsgroups.

No value judgement is intended by my classification. There is no

denying that Zen languages are often very powerful tools (for those who

have reached satori) and that there is a Zen to really mastering, say,

C. Personally, I have never been able to master any Zen language but

can pick up tool languages fairly quickly, so I prefer tool languages.

This is probably because I am not a programmer (I''m a mathematician who

likes to program as a hobby and for numerical simulations) and so don''t

have the time to invest in picking up a Zen language. Hard-core hackers

might presumably lean towards the Zen languages.

Just curious

-John Coleman

解决方案

don''t know but there is "Zen of Python".

Actually, Python has the distinction of being both a great tool

language *and* a great Zen language. That''s what makes Python so cool

;-)))

Ron Stephens

Python411

www.awaretek.com/python/index.html

Mu.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
旋转变压器---数字转换器作为现代伺服系统被广泛使用的角位置测量系统,大量应用于高精度及大型数控系统、机器人控制、工业控制、武器火力控制及惯性导航领域。 传统的角测量系统面临的问题有:体积、重量、功耗偏大,调试、误差补偿试验复杂,费用较高。本文从微型化、智能化的方向进行研究,是解决传统角测量系统所面临问题的好途径。 本文所研究的旋转变压器---数字转换器是由信号调理模块、系统芯片C8051F064和输出控制模块组成的。整个系统的三路输入信号为X=AsinOcosar、Y=Acosθcos ot和Z=Ucosar(基准信号),输出信号为偏转角θ,输出形式为16 位数字量。信号调理模块是由模拟电路组成的,包括信号输入电路、相敏整流电路、滤波电路和直流稳压电源电路,其难点在于相敏整流电路的设计。信号调理模块的主要功能是把输入的交流信号X=AsinOcosor、Y=Acosθcosot转变成直流信号Bsinθ和Bcosθ,并使输出的直流信号在0~2.4V之间;系统芯片C8051F064是CYGNAL公司近年来推出的一款功能齐全的完全集成的混合信号片上系统型单片机。在本文所设计的系统,系统芯片的输入信号为直流信号Bsinθ和Bcosθ,通过片内自带的2个16位A/D转换器对输入信号的数据进行采样和转换,并对转换完的数据进行滤波处理,以减小由于外界干扰而产生的误差,再用除法和反正切函数解算出偏转角θ的16位数字量;输出控制模块主要完成的功能是通过UARTO向计算机实时发送由单片机计算出来的偏转角度0的16位数字量,而串口的RS-232电平与单片机系统采用的是TTL电平之间的转换所采用的转换芯片是MC1488和MC1489。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值