![]() | |
编程范型 | 多范型:过程式、结构化、模块化、反射式、面向对象、函数式 |
---|---|
設計者 | 吉多·范罗苏姆 |
實作者 | Python软件基金会 |
发行时间 | 1991年[1] |
当前版本 | 3.14.0a3(预发布版本) 3.13.1(最稳定版本) |
型態系統 | 鸭子类型[2]、动态、强类型[3]、渐进(自从3.5)[4] |
操作系统 | 跨平臺 |
許可證 | Python软件基金会许可证 |
文件扩展名 | .py、.pyi、.pyc、.pyd、.pyo(3.5之前)[5]、.pyw、.pyz(自从3.5)[6] |
網站 | www |
主要實作產品 | |
CPython、PyPy、Stackless Python、MicroPython、CircuitPython、IronPython、Jython | |
衍生副語言 | |
Cython、RPython | |
啟發語言 | |
ABC[7]、ALGOL 68[8]、APL[9]、C[10]、C++[11]、CLU[12]、Dylan[13]、Haskell[14]、Icon[15]、Java[16]、Lisp[17]、Modula-3[11]、Perl[18]、Standard ML[9] | |
影響語言 | |
Boo、Cobra、CoffeeScript[19]、D、F#、GDScript[20]、Genie[21]、Go[22]、Groovy、JavaScript[23][24]、Julia[25]、Mojo[26]、Nim、Ruby[27]、Starlark[28]、Swift[29] | |
Python(英式發音:/ˈpaɪθən/;美式發音:/ˈpaɪθɑːn/),是一种广泛使用的解释型、高级和通用的编程语言。Python支持多种编程范型,包括结构化、过程式、反射式、面向对象和函数式编程。它拥有动态类型系统和垃圾回收功能,能够自动管理内存使用,并且其本身拥有一个巨大而广泛的标准库。它的语言结构以及面向对象的方法,旨在帮助程序员为小型的和大型的项目编写逻辑清晰的代码。
吉多·范罗苏姆于1980年代后期开始研发Python,作为ABC语言的后继者[15],它也可以被视为采用了叫做M-表达式的中缀表示法的一种LISP方言[30]。吉多·范罗苏姆于1991年首次发布 Python 0.9.0[31]。Python 2.0于2000 年发布并引入了新功能。Python 3.0于2008年发布,它是该语言的主要修订版,并非完全向后兼容。Python 2于2020年随2.7.18版停止支持[32]。
Python的设计哲学,强调代码的可读性和简洁的语法,尤其是使用空格缩进来划分代码块。相比於C语言或Java,Python让开发者能够用更少的代码表达想法。
Python解释器本身几乎可以在所有的操作系统中运行,它的官方直譯器CPython是用C语言编写的。Python是一個由社群驱动的自由软件,目前由Python软件基金会管理。Python是最受欢迎的编程语言之一[33][34][35][36]。
release
的参考文献提供内容duck
的参考文献提供内容pep483
的参考文献提供内容faq-created
的参考文献提供内容String slicing came from Algol-68 and Icon.
even though the design of C is far from ideal, its influence on Python is considerable.
Compared with other programming languages, Python’s class mechanism adds classes with a minimum of new syntax and semantics. It is a mixture of the class mechanisms found in C++ and Modula-3.
replace "CLU" with "Python", "record" with "instance", and "procedure" with "function or method", and you get a pretty accurate description of Python's object model.
The C3 method itself has nothing to do with Python, since it was invented by people working on Dylan and it is described in a paper intended for lispers.
Python is a simple, yet powerful, interpreted programming language that bridges the gap between C and shell programming, and is thus ideally suited for "throw-away programming" and rapid prototyping. Its syntax is put together from constructs borrowed from a variety of other languages; most prominent are influences from ABC, C, Modula-3 and Icon.
The Python interpreter is easily extended with new functions and data types implemented in C. Python is also suitable as an extension language for highly customizable C applications such as editors or window managers.
This module provides regular expression matching operations similar to those found in Perl.
gdscript
的参考文献提供内容go
的参考文献提供内容Julia
的参考文献提供内容bini
的参考文献提供内容starlark
的参考文献提供内容Of course, it also greatly benefited from the experiences hard-won by many other languages in the field, drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list.
Python can be seen as a dialect of Lisp with "traditional" syntax (what Lisp people call "infix" or "m-lisp" syntax).
Python has won the TIOBE programming language of the year award! This is for the fourth time in the history, which is a record! The title is awarded to the programming language that has gained most popularity in one year.