Welcome to 陈俊峰's ---BeetleHeaded Man Blog !

  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  58 随笔 :: 32 文章 :: 18 评论 :: 0 Trackbacks

与python第一次亲密接触!
在网上搜集了很多资料和浏览了python的很多相关文章,它给我的总体感觉是在文本处理上的高效和语言的"人性化",
面举个例子来说明我为什么觉得"人性化":

1. Reason One :  长整型无长度限制,除了电脑硬件的限制
Although both lower case "l" and upper case "L" are allowed as suffix for long integers, it is strongly recommended to always use "L", since the letter "l" looks too much like the digit "1".
Plain integer literals that are above the largest representable plain integer (e.g., 2147483647 when using 32-bit arithmetic) are accepted as if they were long integers instead.
There is no limit for long integer literals apart from what can be stored in available memory. Some examples of plain integer literals (first row) and long integer literals (second and third rows):       
7      2147483647                                      0177
3L    79228162514264337593543950336L    0377L   0x100000000L
       79228162514264337593543950336                 0xdeadbeef


2. Reason Two : (quote) 一个python小tip,交换两个变量的值,而且不使用第三个变量:
>>> a,b = 1,2
>>> a,b = b,a
>>> a,b
(2, 1)
>>> 

3.Reason Three:
它是用C语言开发的,但是效率比起C语言也差了多少,当然没C快啦,但是他里面的很多函数非常方便,功能比C强大很多。
4.Reason Four : 
最让人兴奋的原因就是BitComet就是它开发出来的。

他避免了很多初学程序设计时常常出现的问题,尽管对于大多数人来说都是几乎不会发生的,但是从这点可以看出它对它的用户是傻瓜开始的。因为傻瓜才会犯哪些错误!

  


posted on 2006-04-12 18:14 Jeff-Chen 阅读(235) 评论(2)  编辑 收藏 引用 所属分类: Python

评论

# re: 初识 python! 2006-04-13 08:33
"但是从这点可以看出它对它的用户是傻瓜开始的。因为傻瓜才会犯哪些错误!"



咋看就咋觉得这话像傻瓜说的,首先条理不清,其次前后意义矛盾!

blog几时成了茅厕了?专供放屁?

  回复  更多评论
  

# re: 初识 python! 2006-04-13 10:54 Jeff-Chen
批评的对,我自己都觉得我的表达能力有限,有待改正哈!  回复  更多评论
  


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理