一、Python的起源
Python是一種高級編程語言,由Guido van Rossum於1989年在荷蘭創建。Python被設計用於具有簡單易讀語法的高效編程,可以輕鬆地寫出清晰的、邏輯性強的代碼。Python語言的名字來源於作者的一個喜好,他喜歡BBC電視節目Monty Python’s Flying Circus。初版的Python語言發佈於1991年。
二、Python的免費性質
Python是一款自由、開放、免費的軟體,以Python軟體基金會的名義發布,並遵循Python軟體基金會授權的開源協議。這意味著任何人都可以自由地複製、分發和修改Python的源代碼。Python社區還可以向該基金會提供資源或服務以支持其發展。
三、Python的開源協議
Python使用的開源協議是PSF授權。在PSF授權下,任何人都可以自由地複製、分發、傳遞Python,還可以從中獲得商業利益而無需向Python軟體基金會支付費用。不過,在發布的衍生作品中,必須保留原始版權聲明,以同時支持軟體的開源性。
# Python的開源協議示例
# The Python Software Foundation License Version 2
# --------------------------------------------
# 1. This LICENSE AGREEMENT is between the Python Software Foundation
# ("PSF"), and the Individual or Organization ("Licensee") accessing and
# otherwise using Python 2.7.18rc1 software in source or binary form and its
# associated documentation.
# 2. Subject to the terms and conditions of this License Agreement, PSF hereby
# grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
# analyze, test, perform and/or display publicly, prepare derivative works,
# distribute, and otherwise use Python 2.7.18rc1 alone or in any derivative
# version, provided, however, that PSF's License Agreement and PSF's notice of
# copyright, i.e., "Copyright © 2001-2013 Python Software Foundation; All Rights
# Reserved" are retained in Python 2.7.18rc1 alone or in any derivative version
# prepared by Licensee.
# 3. In the event Licensee prepares a derivative work that is based on or
# incorporates Python 2.7.18rc1 or any part thereof, and wants to make the
# derivative work available to others as provided herein, then Licensee hereby
# agrees to include in any such work a brief summary of the changes made to Python
# 2.7.18rc1.
# 4. PSF is making Python 2.7.18rc1 available to Licensee on an "AS IS" basis.
# PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE,
# BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF
# MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON
# 2.7.18rc1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
# 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 2.7.18rc1
# FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
# MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.7.18rc1, OR ANY DERIVATIVE
# THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
# 6. This License Agreement will automatically terminate upon a material breach of
# its terms and conditions.
# 7. Nothing in this License Agreement shall be deemed to create any relationship
# of agency, partnership, or joint venture between PSF and Licensee. This License
# Agreement does not grant permission to use PSF trademarks or trade name in a
# trademark sense to endorse or promote products or services of Licensee, or any
# third party.
# 8. By copying, installing or otherwise using Python 2.7.18rc1, Licensee agrees
# to be bound by the terms and conditions of this License Agreement.
四、Python的版本歷史
Python的歷史版本分別為1.x、2.x和3.x,其中2.x和3.x是主要版本。1.x版本是最初的Python版本,現已廢棄。2.x版本和3.x版本都在現役中,然而它們在某些方面不兼容,所以應謹慎考慮選擇哪個版本。
在2017年發布的Python 2.7.14是最後一個2.x版本。目前,Python 2.x僅提供有限的安全更新,僅限於確保支持代碼的向後兼容性。
Python 3.x系列從2008年開始推出,其設計目的是優化2.x版本中存在的一些問題,並提供新的功能。Python 3.x不完全向後兼容Python 2.x,其中最大的變化是將print語句轉換為print()函數。
五、Python受歡迎的原因
Python的簡單性、可讀性和易用性是它受歡迎的主要原因之一。Python的語法使得代碼可以在極短的時間內寫出,並且對初學者來說易於理解。
Python的生態系統很龐大,充滿了各種庫和框架,以滿足實現不同任務的需要。許多學校教授概念性編程都使用Python。此外,Python應用廣泛,用於機器學習、數據分析、網站開發等領域。
六、結論
Python是一種自由、開源、免費的軟體,發揚Python的價值旨在於幫助開發人員輕鬆地構建優化的代碼。
Python的先進性可以滿足各種開發需求,尤其是在數據科學、網路和大數據領域。Python是解決各種編程問題的理想選擇,也是適合初學者試圖學習編程的語言。
原創文章,作者:小藍,如若轉載,請註明出處:https://www.506064.com/zh-tw/n/308396.html
微信掃一掃
支付寶掃一掃