说明如下:

不是我喜欢炫耀英语,这只是向大家展示资料权威的一种形式。因为毕竟我的有些小观点和曾经流行的培训不太一样。所以,必须引用英文原版的东西,来打消读者的疑虑。

In an informal sense, in Python we do things with stuff. “Things” take the
form of operations like addition and concatenation, and “stuff” refers to the
objects on which we perform those operations.

Some what more formally, in Python, data takes the form of objects—either
built-in objects that Python provides, or objects we create using Python
classes or external language tools such as C extension libraries.

以上的大体意思是:

不太规范的说法是,Python用物做事,做事的意思是像加法和连接之类的操作,而物是指我们对其操作的(物体-对象)。

如果规范一点讲,在Python里,数据是以对象的形式存在的,要么是Python提供的内置对象,要么是我们使用class创建的,或者用外部其他语言比如C创建的文库。

1.Programs are composed of modules.

2.Modules contain statements.

3.Statements contain expressions.

4.Expressions create and process objects

这四句话很重要,我在其

技术
今日推荐
PPT
阅读数 99
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:766591547
关注微信