我刚去用“license”作为变量名,它变成高亮表示它是一个保留字,“license”是做什么用的?
最佳答案
这不是关键字,it's a constant added by the site module (其他一些是copyright
和credits
)。如果您想知道它的作用,请尝试:
print license
>>> Type license() to see the full license text
然后如果你输入
license()
输出将是:
A. HISTORY OF THE SOFTWARE
Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands as a successor of a language called ABC. Guido remains Python's principal author, although it includes many contributions from others.
In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) in Reston, Virginia where he released several versions of the software.
In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. In October of the same year, the PythonLabs team moved to Digital Creations (now Zope Corporation, see http://www.zope.com). In 2001, the Python Software Foundation (PSF, see http://www.python.org/psf/) was formed, a non-profit organization created specifically to own Python-related Intellectual Property. Zope Corporation is a sponsoring member of the PSF.
All Python releases are Open Source (see http://www.opensource.org for Hit Return for more, or q (and Return) to quit:
关于python - 关键字 "license"在 python 中有什么用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21503045/