Python 3.3發布
Python(英語發音:/?p??θ(?)n/),是一種面向對象、直譯式電腦編程語言,也是一種功能強大的通用型語言,已經具有近二十年的發展歷史,成熟且穩定。它包含了一組完善而且容易理解的標準庫,能夠輕松完成很多常見的任務。它的語法非常簡捷和清晰,與其它大多數程序設計語言不一樣,它使用縮進來定義語句。
Python支持命令式程序設計、面向對象程序設計、函數式編程、面向切面編程、泛型編程多種編程范式。與Scheme、Ruby、Perl、Tcl等動態語言一樣,Python具備垃圾回收功能,能夠自動管理存儲器使用。它經常被當作腳本語言用于處理系統管理任務和網絡程序編寫,然而它也非常適合完成各種高級任務。Python虛擬機本身幾乎可以在所有的作業系統中運行。使用一些諸如py2exe、PyPy、PyInstaller之類的工具可以將Python源代碼轉換成可以脫離Python解釋器運行的程序。
Python的主要參考實現是CPython,它是一個由社區驅動的自由軟件。目前由Python軟件基金會管理。基于這種語言的相關技術正在飛快的發展,用戶數量快速擴大,相關的資源非常多。
Python 發布了 v3.3版。主要新特性包括:新的語法功能,如 generator delegation 的新 yield from 表達式;
新的語法特性:
- New yield from expression for generator delegation.
- The u'unicode' syntax is accepted again for str objects.
New library modules:
- faulthandler (helps debugging low-level crashes)
- ipaddress (high-level objects representing IP addresses and masks)
- lzma (compress data using the XZ / LZMA algorithm)
- unittest.mock (replace parts of your system under test with mock objects)
- venv (Python virtual environments, as in the popular virtualenv package)
New built-in features:
- Reworked I/O exception hierarchy.
Implementation improvements:
- Rewritten import machinery based on importlib.
- More compact unicode strings.
- More compact attribute dictionaries.
Security improvements:
- Hash randomization is switched on by default.
Please read on for a comprehensive list of user-facing changes.
新的庫模塊,包括 faulthandler(調試崩潰),ipaddress,lzma,unittest.mock 和 venv;重做了I/O exception hierarchy,重寫了 import machinery;默認哈希隨機化,等等。