python初入引导---翻译自官网

        python引导及综述:

        相对于Perl/Ruby/Scheme/Java来说,python是一门更为简单高效的面向对象编程语言。

        如下是python的一些显著特征:

使用优雅的语法,使您编写的程序更易于阅读。

shǐ使 yòng yōu de shǐ使 nín biān xiě de chéng gèng yuè

Is an easy-to-use language that makes it simple to get your program working. This makes Python ideal for prototype development and other ad-hoc programming tasks, without compromising maintainability.

是一种易于使用的语言,它使程序运行变得简单。这使得Python非常适合于原型开发和其他ad-hoc编程任务,而不影响可维护性。

shì zhǒng shǐ使 yòng de yán shǐ使 chéng yùn xíng biàn de jiǎn dān zhè shǐ使 de P y t h o n fēi cháng shì yuán xíng kāi a d - h o c biān chéng rèn wu ér yǐng xiǎng wéi xìng

Comes with a large standard library that supports many common programming tasks such as connecting to web servers, searching text with regular expressions, reading and modifying files.

附带一个大型标准库,支持许多常见的编程任务,如连接到Web服务器、使用正则表达式搜索文本、读取和修改文件。

dài xíng biāo zhǔn zhī chí duō cháng jiàn de biān chéng rèn wu lián jiē dào W e b shǐ使 yòng zhèng biǎo shì sōu suǒ wén běn xiū gǎi wén jiàn

Python's interactive mode makes it easy to test short snippets of code. There's also a bundled development environment called IDLE.

Python的交互模式使测试短代码片段变得容易。还有一个称为空闲的捆绑开发环境。

P y t h o n de jiāo shì shǐ使 shì duǎn dài piàn duàn biàn de róng hái yǒu chēng wéi kòng xián de kǔn bǎng kāi huán jìng

Is easily extended by adding new modules implemented in a compiled language such as C or C++.

通过添加新的模块在编译语言如C或C++实现轻松扩展。

tōng guò tiān jiā xīn de kuài zài biān yán C huò C + + shí xiàn qīng sōng kuò zhǎn

Can also be embedded into an application to provide a programmable interface.

也可以嵌入到应用程序中以提供可编程接口。

也可以嵌入到应用程序中以提供可编程接口。

运行在任何地方,包括Mac OS X、Windows、Linux和UNIX,非官方版本还可用于Android和iOS。

yùn xíng zài rèn fāng bāo kuò M a c O S X W i n d o w s L i n u x U N I X hái yǒu yòng A n d r o i d i O S de fēi guān fāng bǎn běn

从两个方面定义free:下载或使用Python或将其包含在应用程序中完全免费;Python也可以自由修改和重新分发,因为虽然语言是受版权保护的,但它可以在开放源码许可下使用。

Python的一些编程语言特性是:

P y t h o n de xiē biān chéng yán xìng shì

A variety of basic data types are available: numbers (floating point, complex, and unlimited-length long integers), strings (both ASCII and Unicode), lists, and dictionaries.

可以使用各种基本数据类型:数字(浮点、复杂和无限长长整数)、字符串(ASCII和Unicode)、列表和字典。

shǐ使 yòng zhǒng běn shù lèi xíng shù diǎn xiàn cháng cháng zhěng shù chuàn A S C I I U n i c o d e liè biǎo diǎn

Python supports object-oriented programming with classes and multiple inheritance.

Python支持类和多继承的面向对象编程。

P y t h o n zhī chí lèi duō chéng de miàn xiàng duì xiàng biān chéng

Code can be grouped into modules and packages.

代码可以分为模块和包。

dài fēn wéi kuài bāo

The language supports raising and catching exceptions, resulting in cleaner error handling.

语言支持提高和捕获异常,从而导致更干净的错误处理。

gāi yán zhī chí gāo huò cháng cóng ér dǎo zhì gèng gān jìng de cuò chǔ

Data types are strongly and dynamically typed. Mixing incompatible types (e.g. attempting to add a string and a number) causes an exception to be raised, so errors are caught sooner.

数据类型是强动态类型的。混合不兼容类型(例如试图添加字符串和数字)会引发异常,因此错误会更快被捕获。

shù lèi xíng shì qiáng dòng tài lèi xíng de hùn jiān róng lèi xíng shì tiān jiā chuàn shù huì yǐn cháng yīn cuò huì gèng kuài bèi huò

Python contains advanced programming features such as generators and list comprehensions.

Python包含高级编程的特点,如发电机和列表解析。

P y t h o n bāo hán gāo biān chéng de diǎn diàn liè biǎo jiě

Python's automatic memory management frees you from having to manually allocate and free memory in your code.

Python的自动内存管理使您无需手动分配和释放代码中的内存。

P y t h o n de dòng nèi cún guǎn shǐ使 nín shǒu dòng fēn pèi shì fàng dài zhōng de nèi cún


See the SimplePrograms collection of short programs, gradually increasing in length, which show off Python's syntax and readability.

看到短节目simpleprograms收集,长度逐渐增加,这表明了Python的语法和可读性。












评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值