Skip to Content
Python 技術手冊 第三版
book

Python 技術手冊 第三版

by lex Martelli, Anna Martelli Ravenscroft, Steve Holden
January 2018
Intermediate to advanced
856 pages
17h 17m
Chinese
GoTop Information, Inc.
Content preview from Python 技術手冊 第三版
791
26
v2/v3 的移轉與共存
Python 3 最早的發行版(本書中我們稱為 v3 的東西之前身)出現於 2008
年,具體而言就是「Python 3.0」:那個發行版並非正式上線版的品質,
原本的目標也非如此。它的主要用途是讓人們開始適應語法和語意上的改
變,某些部分的實作並沒有達到令人滿意的程度(特別是 I/O 機能,現在
已大幅改善)。在我們撰寫本章之時,主流的發行版是 2.7.12 3.5.2,而
3.6.0 的發行版剛在 2016 12 月推出,非常接近我們完成本書的期限(結
果就是,我們以「3.6 中的新功能」提到 3.6 的重點功能時,有很大一部分
是基於 3.6 的測試版本:我們無法宣稱有完整涵蓋 3.6)。
Python 的核心開發人員花了很大的工夫將 v3 的功能後向移植(backport
v2,但這類活動現在已經結束了,v2 的功能已被凍結(v3 標準程式庫
的某些功能對 v2 的後向移植版可以
pip install
取用,如本書前面一再提
到的那樣)。v2 只會有修正安全性臭蟲的發行版,而即使是那些,也會在
v2 的維護工作於 2020 年正式結束的時候停止。2014 Guido van Rossum
PyCon NA 重點演說(
https://www.youtube.com/watch?v=0Ef9GudbxXY
明確地排除了任何 2.8 發行版的可能性,如果你堅持使用 v2,那麼 2020
後,你就得靠自己了。
對那些已經精通 Python 的建置系統 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

測試驅動開發|使用 Python

測試驅動開發|使用 Python

Harry J.W. Percival

Publisher Resources

ISBN: 9789864766819