python - 关键字 "license"在 python 中有什么用?

标签 python

我刚去用“license”作为变量名,它变成高亮表示它是一个保留字,“license”是做什么用的?

最佳答案

这不是关键字,it's a constant added by the site module (其他一些是copyrightcredits)。如果您想知道它的作用,请尝试:

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/

相关文章:

python - 快速迭代大型数据框中的行以确定列的内容

python - 如何将文本文件转换为json文件?

python - 带有(非 unicode)字符串的 PyUnicode_FromFormat

Python:如何删除 pdb 中的快捷方式

python - TDD django 模型

python - 使用 blender 和 twisted (python) 的服务器端渲染

python - 合并字典的字典和总和值

python - 创建持续不断的变化提要

Python执行一个文件,然后删除它

python - SymPy -- 定义变量域