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

Python 技術手冊 第三版

by lex Martelli, Anna Martelli Ravenscroft, Steve Holden
January 2018
Intermediate to advanced content levelIntermediate to advanced
856 pages
17h 17m
Chinese
GoTop Information, Inc.
Content preview from Python 技術手冊 第三版
730
|
24 章 擴充與內嵌標準型的 Python
代碼 C 型別 意義
L long long
一個 Python
int
變為一個 C
long long
Windows 上的
__int64
)。
O PyObject*
取得 Python 引數非 NULL 的借取參考。
O! type+PyObject*
就像代碼
O
,但加上型別檢查(參閱下
)。
O& convert+void*
任意的轉換(參閱下面)。
s char*
不內嵌nulls Python 字串到 C
char*
(以 UTF-8 編碼)。
s# char*+int
任何的 Python 字串到 C 的位址和長度。
t# char*+int
唯讀的單區段緩衝區(single-segment
buffer)到 C 的位址和長度。
u Py_UNICODE*
不內嵌 nulls Python Unicode C
u# Py_UNICODE*+int
任何的 Python Unicode C 的位址和
長度。
w# char*+int
可讀寫的單區段緩衝區到 C 的位址和長
度。
z char*
就像
s
,但也接受
None
(將 C
char*
設為
NULL
)。
z# char*+int
就像
s#
,但也接受
None
(將 C
char*
NULL
,並將
int
設為
0
)。
(...)
如每個
...
一個 Python 序列的每個項目會被視為一
個引數。
|
接下來的所有引數都是選擇性的。
:
格式(format)結束,後面接著錯誤訊
息的函式名稱。
;
格式結束,後面接著整個錯誤訊息文 ...
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.
Start your free trial

You might also like

測試驅動開發|使用 Python

測試驅動開發|使用 Python

Harry J.W. Percival
Linux 内核观测技术BPF

Linux 内核观测技术BPF

David Calavera, Lorenzo Fontana

Publisher Resources

ISBN: 9789864766819