python编程语言
The Python programming language is a general-purpose programming language that has carved its own notch into the list a most used programming languages. This language has many key takeaways that make it stand out for its uses and applications in the corporate world, as well as, many other areas of industry. This complex, yet simple language’s history is fascinating. I will go into a brief history of this language to better understand it’s origins and the areas of use it has seen throughout the years.
Python编程语言是一种通用的编程语言,已在最常用的编程语言列表中刻入了自己的标记。 该语言具有许多重要的优点,使其在企业界以及许多其他行业中的使用和应用脱颖而出。 这种复杂而简单的语言的历史令人着迷。 我将简要介绍该语言的历史,以更好地了解其起源和多年来使用的领域。
So, even though Python is still used all over the world in almost every industry you can imagine, it was conceived in the late 1980s. It was then implemented in 1989 by Guido van Rossum. That is right, like a good amount of other programming languages, Python has been around and has weather the test of time well. In fact, Python’s popularity only continues to rise. This upward trend shows no signs in stopping, leaving Python as a force to be reckoned with.
因此,尽管Python在几乎您可以想象的每个行业中仍在全球范围内使用,但它是在1980年代后期构思的。 然后由Guido van Rossum在1989年实施。 是的,就像大量其他编程语言一样,Python已经存在并且经受了时间的考验。 实际上,Python的受欢迎程度只会继续上升。 这种上升趋势没有停止的迹象,这使Python成为不可忽视的力量。
Guido van Rossum, often referred to as, Benevolent Dictator for Life (BDFL), is the principal author of the Python programming language. Guido van Rossum, has recently, however, stepped down as leader on July 12, 2018. Python itself is actually named after Monty Python’s Flying Circus. The first version of the code published by Van Rossum was labeled version 0.9.0. Even in this early version of code there were classes with inheritance, exception handling, functions, and many other major datatypes. Python’s userbase form comp.lang.python in 1994 was formed, leading to more growth and use of the language. As you can see, Python had a strong core foundation right out of the gate. It is no wonder the potential for this flexible language is being pushed everyday.
Guido van Rossum,通常被称为生命仁慈独裁者(BDFL),是Python编程语言的主要作者。 但是,Guido van Rossum最近于2018年7月12日卸任领导人。Python本身实际上是以Monty Python的Flying Circus命名的。 Van Rossum发布的第一版代码标记为0.9.0版。 即使在此早期版本的代码中,也存在带有继承,异常处理,函数和许多其他主要数据类型的类。 Python的用户群于1994年形成comp.lang.python,从而导致了该语言的更多发展和使用。 如您所见,Python拥有强大的核心基础。 难怪这种灵活语言的潜力每天都会被推广。
The language was in no way perfect in the early stages though. That started to change January 1994, with the release of version 1.0. In this version major features including functional tools like lamda, map, filter and reduce were introduced to the language. It was at version 1.4 that keyword arguments came into existence with the language, inspired by Modula-3. Also, support for complex numbers, among other features. Van Rossum also launched the Computer Programming for Everybody (CP4E), funded by DARPA, around this time. The goal was to make programming more accessible to more people with basic “literacy” in coding. Python was the center of this, due to it’s clean, easy to pick up nature. The project has been inactive since 2007.
但是在早期,这种语言绝不是完美的。 1994年1月,随着1.0版的发布,这种情况开始改变。 在此版本中,该语言引入了主要功能,包括lamda ,地图,过滤器和reduce等功能工具。 在1.4版中,受Modula-3启发,关键字自变量随该语言一起出现。 此外,除其他功能外,还支持复数。 范·罗瑟姆(Van Rossum)也在此期间启动了由DARPA资助的“所有人的计算机编程(CP4E)”。 目的是使更多的编程人员具有基本的“读写能力”来进行编程。 Python是它的中心,因为它很干净,很容易接受自然。 自2007年以来,该项目一直无效。
BeOpen.com formed into BeOpen PythonLabs team, under the direction of early Google alum Domenic Merenda in 2000. Version 1.6 and version 2.0 of Python have a good volume of overlapping, mostly because Corporation for National Research Initiatives (CNRI)(Where Van Rossum started working from 1995–2000, switching over from CWI in 1995) requested that version 1.6 be released to summarize Python’s development to the point at which the development team left to BeOpen PythonLabs. Version 2.0 was the first release by the BeOpen PythonLabs team. After this many PythonLabs developers, including van Rossum, joined Digital Creations.
BeOpen.com在2000年早期Google校友Domenic Merenda的指导下成立了BeOpen PythonLabs团队。Python的1.6版和2.0版有很多重叠之处,这主要是因为国家研究计划公司(CNRI)(凡·罗瑟姆创立于此)从1995年至2000年工作,从1995年从CWI转换而来)要求发布1.6版,以概述Python的开发,直至开发团队移交给BeOpen PythonLabs。 版本2.0是BeOpen PythonLabs团队的第一个版本。 之后,包括van Rossum在内的许多PythonLabs开发人员加入了Digital Creations。
Version 2 included list comprehensions and garbage collection. These two features were incredibly impactful to the language. Python version 2.1(2001) included a change to the language specification to support nested scopes, to be more like other statically scoped programming languages. A feature turned off by default and later required in version 2.2(2001). Also, in version 2.2 they introduced a unification of Python’s types and classes into a single hierarchy and generators. This helped make Python’s object model more consistent with pure object orientation. In version 2.5(2006), we first saw the with statement added to the language. Version 2.6 overlapped the version 3.0 release. Python version 2.7(2009), was the last release in the 2x series. Python 3 emerged from this change. In November 2014, It was announced that Python 2.7 would no longer be receiving support after 2020. Support ended on January 1, 2020 and cold freeze of the 2.7 development branch. The actual final release of 2.7 (2.7.18), came out on April 20, 2020. It included critical bug fixes and release blockers.
第2版包括列表理解和垃圾回收。 这两个功能对语言产生了难以置信的影响。 Python版本2.1(2001)对语言规范进行了更改,以支持嵌套作用域,更像其他静态作用域编程语言。 默认情况下,此功能已关闭,而更高版本在2.2(2001)中需要。 此外,在2.2版中,他们将Python的类型和类引入了一个单一的层次结构和生成器。 这有助于使Python的对象模型与纯面向对象更加一致。 在版本2.5(2006)中,我们首先看到在语言中添加了with语句。 2.6版与3.0版重叠。 Python版本2.7(2009)是2x系列的最后一个版本。 Python 3从此更改中诞生。 2014年11月,宣布Python 2.7将在2020年之后不再获得支持。支持于2020年1月1日终止,并且2.7开发分支被冷冻结。 实际的最终版本2.7(2.7.18)于2020年4月20日发布。它包括严重的错误修复和发行阻止程序。
Python version 3 was release December 3, 2008. This version was designed to fix the flaws of the pervious versions fundamentally. The guiding principle of Python 3 was: “reduce feature duplication by removing old ways of doing things”. This version is not backwards compatible with any of the 2x versions or earlier. The Python 3x series has included incredible updates. Some of them include a built in print function(instead of the 2x way of using statements), the removal of the Python 2 input function and the renaming of Python 2’s raw_input function. Moving reduce out of the built-in namespace and into functools, adding support for optional function annotations, used for informal type declarations, as well as, other purposes, unifying str/unicode types, representing text, bringing in separate immutable bytes types, removing backward-compatibility features, including old-style classes, string exceptions, and implicit relative imports, and a change in integer diversion functionality. The current release as this article is published is 3.8.5, although, 3.9 is in beta.
Python版本3于2008年12月3日发布。该版本旨在从根本上修复以前版本的缺陷。 Python 3的指导原则是:“通过消除旧的做事方式来减少功能重复”。 该版本与任何2x或更早版本不向后兼容。 Python 3x系列包含了令人难以置信的更新。 其中一些功能包括内置的打印功能(而不是使用语句的2倍方式),删除了Python 2输入功能以及重命名了Python 2的raw_input函数。 将reduce移出内置名称空间并移入functools,添加对用于非正式类型声明的可选函数注释的支持,以及其他目的,统一str / unicode类型,表示文本,引入单独的不可变字节类型,删除向后兼容功能,包括旧式类,字符串异常和隐式相对导入,以及整数转换功能的更改。 本文发布时,当前版本为3.8.5,尽管3.9是beta版。
Zen of Python
Python之禅
The Zen of Python is 19 “guiding principles” structured for the Python language, that is meant to aid writing computer programs that influence the design of the Python programming language. Tim Peters(Software engineer) posted this list of principles on the Python mailing list in 1999. He left the 20th principle for van Rossum to fill in. It was never filled in though. This was entered as Python Enhancement Proposal(PEP)-20. This is the list of the principles:
Python的Zen是为Python语言构建的19条“指导原则”,旨在帮助编写影响Python编程语言设计的计算机程序。 Tim Peters(软件工程师)在1999年的Python邮件列表中发布了此原则列表。他离开了20条原则供van Rossum填写。尽管如此,它从未被填写。 这被输入为Python Enhancement Proposal(PEP)-20。 这是原则列表:
· Beautiful is better than ugly.
·美丽胜于丑陋。
· Explicit is better than implicit.
·显式优于隐式。
· Simple is better than complex.
·简单胜于复杂。
· Complex is better than complicated.
·复杂胜于复杂。
· Flat is better than nested.
·扁平比嵌套好。
· Sparse is better than dense.
·稀疏胜于密集。
· Readability counts.
·可读性计数。
· Special cases aren’t special enough to break the rules.
·特殊情况不足以违反规则。
· Although practicality beats purity.
·实用性胜过纯度。
· Errors should never pass silently.
·错误绝不能默默传递。
· Unless explicitly silenced.
·除非明确静音。
· In the face of ambiguity, refuse the temptation to guess.
·面对歧义,拒绝猜测的诱惑。
· There should be one — and preferably only one — obvious way to do it.
·应该有一种明显的方法,最好只有一种。
· Although that way may not be obvious at first unless you’re Dutch.
·尽管除非您是荷兰人,否则一开始这种方式可能并不明显。
· Now is better than never.
·现在总比没有好。
· Although never is often better than right now.
·虽然从未往往比现在更好。
· If the implementation is hard to explain, it’s a bad idea.
·如果难以解释实现,则是个坏主意。
· If the implementation is easy to explain, it may be a good idea.
·如果实现易于解释,则可能是个好主意。
· Namespaces are one honking great idea — let’s do more of those!
·命名空间是一个很棒的主意-让我们做更多这些吧!
I hope this article helped introduce Python to you or gave you more insight into the language’s origins that you can add to your knowledge bank. Also, I plan to release segmented tutorials on the Python programming language. Starting with beginner subjects and slowly ramping up to more advanced topics. If you are interested remember to follow my Medium and keep up with my YouTube channel.
我希望本文能帮助您向您介绍Python或使您对可以添加到知识库中的语言起源有更多的了解。 另外,我计划发布有关Python编程语言的分段教程。 从初级主题开始,然后逐步发展为更高级的主题。 如果您有兴趣,请记住关注我的媒体并关注我的YouTube频道。
Sources:
资料来源:
Wikipedia contributors. (2020, August 15). History of Python. In Wikipedia, The Free Encyclopedia. Retrieved 00:21, August 19, 2020, from https://en.wikipedia.org/w/index.php?title=History_of_Python&oldid=973164957
维基百科的贡献者。 (2020年,8月15日)。 Python的历史。 在Wikipedia中,免费百科全书。 于2020年8月19日00:21,从https://en.wikipedia.org/w/index.php?title=History_of_Python&oldid=973164957检索
Wikipedia contributors. (2020, June 9). Zen of Python. In Wikipedia, The Free Encyclopedia. Retrieved 00:21, August 19, 2020, from https://en.wikipedia.org/w/index.php?title=Zen_of_Python&oldid=961628184
维基百科的贡献者。 (2020年,6月9日)。 Python的禅宗。 在Wikipedia中,免费百科全书。 于2020年8月19日00:21,从https://en.wikipedia.org/w/index.php?title=Zen_of_Python&oldid=961628184检索
python编程语言